Home‎ > ‎unix/linux‎ > ‎


For the Server

install nfs

install the necessary application to serve nfs mounts
yum install nfs-utils

enable services

run the following to get everything running properly
systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap

setup the exports file

Modify the file: 
vim /etc/exports

you can present read/write (rw) volumes and read only (ro): 
# group1:
# group2:

Restart services to enable changes

systemctl restart nfs-config
systemctl restart nfs-server

For the Client

Install NFS

yum install nfs-utils

Create the directories that it will mount to

Create the directories on your client where you will want the mount points to be bound to.  You need to create a real directory on your client, and then you can tell the host that thats where the nfs mount will appear at. 
mkdir -p /mnt/driveA
mkdir -p /mnt/driveB

Mount the volumes

The following commands will take the presented nfs mounts and bind them to the directories that you created above
mount -t nfs /mnt/driveA
mount -t nfs /mnt/driveB


Always good to confirm everything is working properly by testing if you can connect to the mounts
df -kh

touch /mnt/driveA/tmp.txt
touch /mnt/driveB/tmp.txt

ll /mnt/driveA/tmp.txt
ll /mnt/driveB/tmp.txt

rm -f /mnt/driveA/tmp.txt
rm -f /mnt/driveB/tmp.txt


df -kh