NETWORK LOCK MANAGER - like UNIX - uses an advisory locking protocol: an NFS server can obliviously grant a client read and/or write access to a file that has already been locked by another client. The NLM assumes that all processes attempting to access a file will follow locking protocol by calling the locking functions correctly and honoring the lock status of the file. The NLM honors read and/or write locking, and allows for byte-range locks or locking of the entire file. A read lock allows nonexclusive concurrent access for reading, but not writing. A write lock is exclusive. If a process is denied access due to a conflict in lock type, it can optionally block until the lock is freed or it can return an error condition.

UNIX advisory locks are propagated to the NFS Network Lock Manager. The UNIX locking process will interoperate with the NLM to implement the fcntl file locking calls via the NFS mount to the actual remote disk file. Thus the file is protected from other UNIX processes that access the file – either locally on the NFS server or via multiple NFS mounts of the same file system – and adhere to the advisory locking protocol.

Note that UNIX/NFS does not employ the concept of Mandatory Share Mode (Open Mode) locking like Windows does. UNIX/NFS locking consists of byte range locking and is strictly programmatic on a previously opened file. Also, UNIX/NFS is incapable of sending an oplock break to a client, and therefore cannot interoperate with Windows clients using Opportunistic Locking.

NETWORK STATUS MONITOR provides the lock manager with information on host status. It monitors the system to ensure that locks will be handled properly if a system crashes while a file is locked. This is referred to as monitored locking. If the server crashes with monitored locks in place, the locks will be reinstated when the server recovers. Conversely, if the client crashes with monitored locks in place, the locks will be automatically freed by the server and must be reinstated by the client when it recovers.

Clients have the option of using lock manager without the status monitor in which case the locking is non-monitored. Non-monitor ed locking is provided for client systems that do not support multi-tasking and cannot run both lock manager and status monitor at the same time. In all other cases, monitored locking is preferred.

4.4PC NFS

PC-NFS implements Byte Range programmatic file locking by interoperating with the server NFS Network Lock Manager. The Windows client will propagate application byte range locks to the UNIX server, where the NLM will interoperate with the UNIX Kernel Lock Manager to actually place the lock on the file. PC-NFS file locking participates in the UNIX advisory locking protocol.

PC-NFS also implements Mandatory Share Mode (Open Mode) locking between PC-NFS clients. However, PC-NFS uses NLM to implement the share mode locks, and a Windows client does not. Therefore, PC-NFS does not recognize Windows client Mandatory Share Mode (Open Mode) locks, and vice versa.

Also, PC-NFS is incapable of sending an oplock break to a client, and therefore cannot interoperate with Windows clients using Opportunistic Locking.

PC-NFS testing for this paper was done with WRQ Reflections NFS Connection Software version 7.1.

11

Page 11
Image 11
HP UX Common Internet File System (CIFS) Client/Server Software manual Pc Nfs