What is 'strict locking' in smb4.conf

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I have had cause to look at my /etc/local/smb4.conf file, and have noticed that the size of the file is a lot less than when I do testparm, which shows all the entries.
Is that normal. Anyway, in the testparm listings, I see that some of the sections / shares have : strict locking = yes, but other sections / shares don't .

Can someone tell me what the significance of strict locking is.
Thanks
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I have had cause to look at my /etc/local/smb4.conf file, and have noticed that the size of the file is a lot less than when I do testparm, which shows all the entries.
Is that normal. Anyway, in the testparm listings, I see that some of the sections / shares have : strict locking = yes, but other sections / shares don't .

Can someone tell me what the significance of strict locking is.
Thanks
Share config is in samba's registry. strict locking gets set if you have mixed NFS / SMB share.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
@Alecmascot
thanks as i was sort of concerned that it meant the directories and files were locked from being shared???

@anados
Yes I do have some shares that are both NFS and SMB. Maybe it would be best if I didn't??

Thanks to you both for the explanations
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Generally, it's better / simpler imho to just use SMB for cases where you want to use SMB + NFS. Locking here refers to when we check for existing POSIX locks.
When this is set to yes, the server will check every read and write access for file locks, and deny access if locks exist. This can be slow on some systems.

See smb4.conf manpage for parameter for more details.
 
Top