Mounting Network File System, NFS
Setting up NFS server
- Install and Start NFS Server
sudo apt install nfs-kernel-server
sudo systemctl start nfs-kernel-server.service
- Update Configuration
/etc/exports
/srv *(ro,sync,subtree_check)
/home *.hostname.com(rw,sync,no_subtree_check)
/scratch *(rw,async,no_subtree_check,no_root_squash)
- Apply new config
sudo exportfs -a
Setting up NFS client
- Verify mount
showmount -e hostname/ip
- Mounting to Unix/Linux
sudo mount -t nfs -o resvport,rw source:source_path mouth_destination
- Permanent Mounting (updating
fstab
)
- Use
sudo vifs
source:source_path mount_destination nfs rw,nolockd,resvport,hard,bg,intr,rw,tcp,nfc,rsize=65536,wsize=65536
- Unmounting
sudo umount mount_path
Unmounting in MacOS
diskutil unmount mount_path