Skip to content

Instantly share code, notes, and snippets.

@doole
Last active May 3, 2020 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doole/93a18db2c3b134d185d74c9e3f7bbd4c to your computer and use it in GitHub Desktop.
Save doole/93a18db2c3b134d185d74c9e3f7bbd4c to your computer and use it in GitHub Desktop.
NFS setup

Set NFS server on macOS

Set paths fot NFS

$ sudo vi /etc/exports

Add directories/drives

/Volumes/folder1 -maproot=nobodynfs	auto,user,nofail,noatime,nolock,intr,tcp,actimeo=1800	0	0
/Volumes/folder2 -maproot=nobody -network 192.168.0.0 -mask 255.255.255.0

Check if file is correctly formated

$ sudo nfsd checkexports

Enable nfsd service

$ sudo nfsd enable

Also enable, disable, start, stop, restart, update, status, checkexports, verbose.

Check if everything is working correctly

$ showmount -e

Set NFS client only on GNU/Linux

Make the mount point for the NFS share

$ mkdir /media/folder1

Edit the stab file

$ vi /etc/fstab

192.168.0.5:/Volumes/folder1 /media/folder1 nfs rw,async,noatime 0 0
192.168.0.5:/Volumes/folder2 /media/folder2 nfs rw,async,noatime 0 0
192.168.0.5:/Volumes/folder3 /media/folder3 nfs	auto,user,nofail,noatime,nolock,intr,tcp,actimeo=1800	0	0

Mount all

$ mount -a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment