NFS version 4 and 3


Version 3 maintains persistent locks. When a file system is unshared and shared back the locks are not destroyed so the state remains the same as if nothing has changed. Version 4 removes any state once the file system is unshared. All the state information is removed and any attempt to access the file again once shared back results in I/O error. The state does not change if it was unshared for some share option changes.
Pseudo file system name space is maintained in version 4. In version 3 clients must request for individual mount of the entire exported share. Version 4 client gets a seamless view of all the exported file system. Path traversal was not allowed in version 3.

Version 4 supports volatile file handles apart from persistent file handle. Server generates a unique file handle to every file. The file handle will change if the file is deleted and replaced by another file however will remain the same if server reboots or file was renamed. In oracle version 4 client connecting to non-oracle version 4 servers, volatile file handle must be used. Lease time is associated with every volatile file handle once the lease expires either the client has to request for a new file handle. Server caches the mapping between persistent and the volatile file handle. The file handle may change due to variety of different reasons like server reboot, file name rename etc.

Client recovery in version 4. The protocol is state full so that both the client and the server maintain the state of the open files and file locks. If the server reboots, client helps in getting the server back to the state where it rebooted by sharing the last state full information with the server. During the recovery phase any file open request are suspended. If any attempt is made the server responds back with GRACE signal allowing the client to wait for the grace amount of time before retrying the operation.

OPEN share support in version 4, where the client can specify either DENY_NONE/READ/WRITE/BOTH for other clients.

Delegation in version 4. Both client and server support delegation. Client never request for delegation, it’s the server which delegates read or write operation to particular client based on the access pattern. This reduces the traffic as most of the operation is delegated on the client end the server is not contacted back and forth for different operations. In case of conflict there are multiple ways to resolve the conflict, e.g is write operation is delegated to server A and the server B opens the file for write, NFS server removes delegation from A. Delegation is tested with eth client before granting. The nfs4cbd daemon uses dynamic port numbers and embeds inside the NFS version 4 packet so it cannot work across NAT and firewall.

UDP and TCP negotiations: The priority is given to the NFS protocol over the transport protocol. NFS version 3 uses UDP but the first available connection oriented protocol is TCP but the priority is given to UDP.

Comments

Popular posts from this blog

zpool and power path partial compatibility

Recoverpoint replication reporting with vmax splitter

Weird problem post power maintenance, no Powerpath pseudo name for Luns