Pcornel
Storage · NFS

NFSv4

Cheat sheet · https://pcornel.dk/topic.php?topic=4140

Back to the Topic

Answer

NFSv4 clients operate through a protocol namespace and state model rather than the NFSv3 plus separate mount-service model. State, leases, sessions in v4.1+, callbacks and security flavor can all affect behavior beyond simple TCP reachability.

Remember

  • NFSv4 ≠ NFSv3 with only a different port.
  • TCP 2049 reachable ≠ NFSv4 state/session healthy.
  • NFSv4.0 ≠ NFSv4.1 sessions.
  • NFSv4.2 feature support ≠ every optional extension implemented.

First checks

  • nfsstat -m | grep vers — negotiated version
  • cat /proc/fs/nfsd/versions — server versions
  • nfsidmap -c; cat /etc/idmapd.conf — ID mapping

Verify in this order

client → 2049 → nfsd v4 (sessions) → filesystem

Where it usually breaks

First mismatch in client identity/DNS → network transport → protocol session → authentication/authorization → export/share → backend filesystem → file operation; preserve identity/pre-state before mutation.

NFS → NFSv4 file-service map

File-service boundaryWhat to verifyProof limit
Endpoint / namespaceCorrect client, server, export/share, path and negotiated protocol versionReachability or namespace visibility does not prove authorization or backend health
Identity / securityEffective identity, protocol security state and export/share/filesystem authorizationAuthentication or one permission layer does not prove complete file access
Failure boundaryNegotiating NFSv4 proves protocol compatibility; it does not prove optional feature support, correct namespace mapping, Kerberos configuration, lock recovery or application consistency.Correlate client, network, server and filesystem evidence for the same operation/time window
AcceptanceHealthy evidence: intended minor version/security are negotiated, namespace resolves correctly, stateful open/lock behavior is stable and representative I/O completes without lease/session recovery errors.Close only after the original operation and server-side/read-back verification succeeds

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4140

Confirmation

Confirm action

Continue?