Lesson 6

Date: 2/22/2017
Network File System (NFS)
Linux System Administration

Exercise: Setting NFS server on CentOS

On centmaster VM, created a directory for NFS sharing:
mkdir -p /NFS2/home
Edit directory /etc/exports and add a configuration line for NFS share with n01 VM:
/NFS2/home  n01(rw)

Stop the firewall on centmaster:
systemctl stop firewalld 

Start the NFS services on centmaster:
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
At this point, directory /NFS2/home is NFS shared with host n01 and should be mountable on the host.

Login to n01 and verify that the RPC services on centmaster are reachable and directory /NFS2/home is exported over NFS:
rpcinfo -p centmaster
showmount -e centmaster

On n01, create the mounting point, and mount /NFS2/home from centmaster:
mkdir -p /NFS2/home
mount centmaster:/NFS2/home /NFS2/home

Verify that the file system is mounted, then unmount it:
df -h
umount /NFS2/home

As an exercise, set an automount for /NFS2/home NFS directory on n01 VM by following the steps in the previous automount exercise.

Take me to the Course Website