How does file locking work between NFS and SMB protocols?
Applies to
- NFS
- CIFS/SMB
- ONTAP
Answer
- NFS client locks are advisory
- SMB client locks are mandatory
- Advisory locking is when the operating system keeps track of which files have been locked by which process, but does not prevent a process from writing to a file that is locked by another process. This means that a process can ignore an advisory lock if the process has adequate permission.
- Because of differences between the NFS and SMB file locks, an NFS client might fail to access a file previously opened by an SMB application.
Additional Information
For more instances of what happens when an NFS client attempts to access a file locked by an SMB application, please see About file locking between protocols.