[Samba] best practice nfs and samba file lock

Jeremy Allison jra at samba.org
Tue Mar 6 18:41:52 UTC 2018


On Tue, Mar 06, 2018 at 12:01:58PM +0100, Michael Wandel via samba wrote:
> Hi,
> 
> i'm searching for best practice in configuration a dual head nfs / samba
> server. At the moment samba 3.6.x is used, an yes i'll know it is EOL.
> 
> We have the problem if the windows client open a file, the aix nfs
> client doesn't recognize the lock and overwrite the file.
> 
> Is there a solution for this or is this the hell of nfs locking ;-)

If you set "posix locking = yes" (default) in smb.conf,
then smbd maps Windows locks into POSIX fcntl locks.

Now these locks are advisory, not mandatory. Is your nfs client
checking for advisory locks ? Do you have wireshark *proof*
of this (N.B., this is the fcntl lock type, *NOT* the BSD
flock or lockf type).



More information about the samba mailing list