Intermediate LevelLinux Commands & SysAdmin
How does NFS (Network File System) share remote storage directories across Linux servers?
❓ Interview Prompt: Explain NFS server exports (/etc/exports), mounting NFS clients, export options (rw, sync, no_root_squash), and RPC protocols.
NFS (Network File System) allows Linux servers to share directories over the network, allowing client machines to mount remote storage as if it were a local disk:
Configuration:
•
Server Export ('/etc/exports'): '/var/nfs/share 192.168.1.0/24(rw,sync,no_subtree_check)'
•
Client Mount: 'sudo mount -t nfs 192.168.1.10:/var/nfs/share /mnt/nfs'
Code Implementation Example
bash
# On NFS Server: Export configuration
echo "/var/exports/data 192.168.1.0/24(rw,sync,no_root_squash)" | sudo tee -a /etc/exports
sudo exportfs -a
# On NFS Client: Mount remote storage
sudo mount -t nfs 192.168.1.10:/var/exports/data /mnt/shared-data💡Exporting remote NFS storage shares and mounting on client servers.
🎯 Interview Key Takeaway
Use NFS for sharing centralized storage across application servers, securing exports by IP subnet in /etc/exports.
#NFS#Network Storage#Mounting#Intermediate
Back to all Linux Commands & SysAdmin Questions→