Pcornel
Linux · File Services

NFS Server

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

Back to the Topic

Answer

An NFS server exports directories listed in /etc/exports (or /etc/exports.d/) with client lists and options such as rw, ro, sync, root_squash and sec=.

Remember

After editing run exportfs -ra. Client specifications are exact (host, subnet, wildcard) — a space between client and options changes the meaning. Open the firewall (firewall-cmd --add-service=nfs).

First checks

  • showmount -e <server> / exportfs -v — NFS exports
  • findmnt -t nfs,nfs4,cifs — mounted network shares
  • smbclient -L //<server> -U <user> — SMB shares
  • testparm -s — Samba configuration check

Verify in this order

/etc/exports → exportfs loads → nfs-server serves → client allowed by its address

Where it usually breaks

First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.

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

Confirmation

Confirm action

Continue?