Skip to content

Mounting Network File System, NFS

Setting up NFS server

  1. Install and Start NFS Server
sudo apt install nfs-kernel-server
sudo systemctl start nfs-kernel-server.service
  1. 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)
  1. Apply new config
sudo exportfs -a

Setting up NFS client

  1. Verify mount
showmount -e hostname/ip
  1. Mounting to Unix/Linux
sudo mount -t nfs -o resvport,rw source:source_path mouth_destination
  1. 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
  1. Unmounting
sudo umount mount_path

Unmounting in MacOS

diskutil unmount mount_path

Resources for Future