Mandatory, Byte Range, and Opportunistic locking are all enabled by default, and should always be enabled for a
[share_name]
share modes = yes <default config – shown for example only> locking = yes <default config – shown for example only> oplocks = yes
These locks are valid when client access is confined to a single CIFS/9000 server that is exclusively NFS mounting the remote file system. If another client is concurrently accessing a file from a different server, either locally or via a NFS mount, then mandatory share mode locks and oplocks are ineffective, because the local server smbd processes are not coordinating exclusive file access. UNIX byte range locking is propagated over NFS, so it will work over multiple NFS mounts. In these cases, disable oplocks, and enable share mode and byte range.
[share_name]
share modes = yes <default config – shown for example only> locking = yes <default config – shown for example only> oplocks = no
Note: It is not recommended to NFS mount a remote file system from the CIFS/9000 server for Windows client access. Performance could be affected.
19