KB 680036 - Configure NFS in linux

KB 680036 - Configure NFS in linux

What is NFS?

Network File System (NFS) is a networking protocol for distributed file sharing. A file system defines the way data in the form of files is stored and retrieved from storage devices, such as hard disk drives, solid-state drives and tape drives. NFS is a network file sharing protocol that defines the way files are stored and retrieved from storage devices across networks.

Network File System (NFS) is used by UNIX/LINUX clients for file access. NFS uses port 2049.

How to Configure NFS?

In Master Node

  1. yum install nfs-utils
  2. systemctl start nfs-server rpcbind
  3. systemctl enable nfs-server rpcbind
  4. mkdir /mnt/sharedoc
  5. chmod 777 /mnt/sharedoc/
  6. vim /etc/exports
    1. /mnt/sharedoc 192.168.0.0/16(rw,sync,no_root_squash)    # shown in fig 2
  7. exportfs -r
  8. firewall-cmd --permanent --add-service=mountd
  9. firewall-cmd --permanent --add-service=rpc-bind
  10. firewall-cmd --permanent --add-service=nfs
  11. firewall-cmd --reload




In Client Node

  1. yum install nfs-utils


  1. showmount -e 192.168.76.xxx  #it will show mount location, change xxx with your master's ip address
  2. mkdir /mnt/nfsdrive
  3. mount 192.168.76.xxx:/mnt/sharedoc /mnt/nfsdrive/
  4. df -h