NFSv4
Cheat sheet · https://pcornel.dk/topic.php?topic=4140
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 versioncat /proc/fs/nfsd/versions— server versionsnfsidmap -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 boundary | What to verify | Proof limit |
|---|---|---|
| Endpoint / namespace | Correct client, server, export/share, path and negotiated protocol version | Reachability or namespace visibility does not prove authorization or backend health |
| Identity / security | Effective identity, protocol security state and export/share/filesystem authorization | Authentication or one permission layer does not prove complete file access |
| Failure boundary | Negotiating 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 |
| Acceptance | Healthy 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