Use Case
NFS shared storage is useful when multiple servers need access to the same dataset or model weights — for example, a training cluster where all nodes read from a shared /data directory.
Architecture
[NFS Server] ──────────────────────────────────
| Private Network (10.x.x.x)
[Node 1] [Node 2] [Node 3]
Step 1 — Set Up the NFS Server
On the NFS server:
$apt-get install -y nfs-kernel-server$mkdir -p /exports/data$chmod 777 /exports/dataEdit /etc/exports:
/exports/data 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash)
Apply:
$exportfs -a$systemctl restart nfs-kernel-serverStep 2 — Mount on Client Nodes
On each client node:
$apt-get install -y nfs-common$mkdir -p /data$mount -t nfs 10.0.0.10:/exports/data /dataMake persistent (/etc/fstab):
10.0.0.10:/exports/data /data nfs defaults,_netdev 0 0
Step 3 — Verify
$df -h /data$# Filesystem Size Used Avail Use% Mounted on$# 10.0.0.10:/exports/data 500G 1G 499G 1% /dataPerformance Tuning
$# Mount with performance options$mount -t nfs -o rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 10.0.0.10:/exports/data /dataSecurity Note
Restrict NFS exports to your private network CIDR only. Never expose NFS to the public internet.
