Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

Samba Issues (2.7.0)

Hello,

Sometimes when a Windows user tries to create folders the will give a erorr (like folder already exist or not found).
In the Samba log I see the error "Error was NT_STATUS_OBJECT_NAME_COLLISION" (at that time stamp)

I've tried to change the following Samba settings :

- Replace “oplocks = no” with “oplocks = yes”
- Add “level2 oplocks = yes”
On the Share Public / Share Secure.

The amount of errors was a lot less, but it still happens sometimes.

Also the error "get_share_mode_lock: get_static_share_mode_data failed: NT_STATUS_NO_MEMORY" is printed a lot.

 

[2021/01/08 12:14:12.335457, 1] ../../source3/locking/share_mode_lock.c:597(get_share_mode_lock)
get_share_mode_lock: get_static_share_mode_data failed: NT_STATUS_NO_MEMORY
[2021/01/08 12:14:12.335482, 2] ../../source3/smbd/close.c:813(close_normal_file)
nobody closed file 3227-3961-04/0 - Origineel Kleur/32270266/00000007/00000169.jpg (numopen=317) NT_STATUS_OK
[2021/01/08 12:14:12.348566, 2] ../../source3/smbd/open.c:1456(open_file)
nobody opened file 3227-3961-04/0 - Origineel Kleur/32270266/00000007/00000170.jpg read=Yes write=Yes (numopen=318)
[2021/01/08 12:14:12.358881, 1] ../../source3/locking/share_mode_lock.c:597(get_share_mode_lock)
get_share_mode_lock: get_static_share_mode_data failed: NT_STATUS_NO_MEMORY
[2021/01/08 12:14:12.358903, 2] ../../source3/smbd/close.c:813(close_normal_file)
nobody closed file 3227-3961-04/0 - Origineel Kleur/32270266/00000007/00000170.jpg (numopen=317) NT_STATUS_OK

[2021/01/08 12:11:54.519380, 2] ../../source3/smbd/open.c:1456(open_file)
nobody opened file 3227-3961-04/0 - Origineel Kleur/Images/32270266/Images.txt.tmp read=Yes write=Yes (numopen=3)
[2021/01/08 12:11:54.533581, 2] ../../source3/smbd/open.c:4026(open_directory)
open_directory: unable to create 3227-3961-04/0 - Origineel Kleur/32270266/00000001. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2021/01/08 12:11:54.534750, 2] ../../source3/smbd/open.c:1456(open_file)
nobody opened file 3227-3961-04/0 - Origineel Kleur/32270266/00000001/00000001.jpg read=No write=No (numopen=4)

 

When using default settings, how often do you see these errors, roughly so we can try to reproduce your case ?  In our regular testing we do not see them.
Have you changed any other configuration than the 2 in your post ?
Have you done any manual cephfs snapshots ?
Is memory OK ?

note: oploks is not safe to enable unless all file system path access is done through Samba/CIFS

With the default settings it happens very often (our software scans images and create for every project a folder, so in 1 hour it can create hundreds of folders) Then I see the error message every few minutes (and our software give's a error on creating the folder). We've added a auto retry in our own software, but with "regular" software this is a great issue (it stops or crashes)

After changing the oplocks option the amount of messages drop significantly.

I can reproduce it with :

for /L %a IN (1,1,500) DO mkdir %a

open_directory: unable to create TEST/1. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/1. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/2. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/2. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/3. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/3. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/4. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/4. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/5. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/5. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/6. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/6. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/7. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/7. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/8. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/8. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/9. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create TEST/9. Error was NT_STATUS_OBJECT_NAME_COLLISION

If I add a sleep it works fine,

for /L %%a IN (1,1,500) DO mkdir %%a & timeout 1

 

Have you done any manual cephfs snapshots ?

I create 3 times a day a snapshot

 

Thanks for the detail, we were actually thinking of writing a script to measure it as to you have.

Have you done any manual cephfs snapshots ?

I create 3 times a day a snapshot

is it possible to have no snapshots and see if it is related.

Yes, I will disable the snapshots for now.

I also disabled the Round Robin DNS (so the client were distributed over the 6 nodes) I now use a static host for the clients.

[2021/01/11 12:41:27.617132, 0] ../../source3/nmbd/nmbd_namequery.c:109(query_name_response)
query_name_response: Multiple (17) responses received for a query on subnet 192.168.100.214 for name XXXXXX<1d>.
This response was from IP 192.168.100.212, reporting an IP address of 192.168.100.224.

 

I did the following changes :

  • Updated to 2.7.1
  • Removed NIC bond's
  • clients use 1 IP instead of Round Robin DNS name.
  • disabled snapshots

But still a lot of NAME COLLISONS

open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create XXXX. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create XXXX/5 - Conversie. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create XXXX/5 - Conversie/IN. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create XXXX/5 - Conversie/IN/1980-1989. Error was NT_STATUS_OBJECT_NAME_COLLISION
open_directory: unable to create XXXX/5 - Conversie/IN/1980-1989/uit. Error was NT_STATUS_OBJECT_NAME_COLLISION

we are not able to reproduce this. we used the same script you posted without putting delay. we also tested using powershell script and also works.