NFS (Network File System ) Server

NFS Network File System is a server-client protocol used for sharing files on Unix, Linux systems. It allows sharing files from a central server allowing several users to access and modify the same files from different clients making all the changes on the files visible on all clients.

NFS Server

In order to configure a node as NFS server the packages 'nfs-utils' and 'rpcbind' must be installed and running :

Port NO -     2049  (for nfs) - 111 port map
Package-     nfs-utils

Configuration and status files


Scripts and commands

Sever Side

To install packages
#rpm -ivh portmap-4.0-63.i386.rpm
#rpm -ivh nfs-utils-lib-devel-1.0.8.i386.rpm
Yum install nfs* -y

To create directory.
# mkdir /share

To export directory.
#vim /etc/exports
/share *(rw,sync ,no_root_squash ,no_all_squash) 

rw                             – Writable permission to shared folder
ro                              -- Read-only permission to shared folder
sync                          – Synchronize shared directory
no_root_squash        – Enable root privilege
no_all_squash          – Enable user’s authority

#exportfs   -r  (Re exports the nfs share)

#service  nfs  restart
#chkconfig   nfs   on
#chkconfig   nfs   --list

For Verification on server
#exportfs   -v
#showmount  -a

On Clinet Side
#yum install showmount rpcbind
Create a Directory
#mkdir  -p  /mnt/data

For Checking on client side
#Showmount   -e


#mount -t nfs remote machine ip:share_name   local_mount_point

#mount -t nfs /mnt/data           (Temporary)

For permanent

#Vi /etc/fstab     /mnt/data        nfs      defaults     0  0

#mount   -a    


#cd /mnt/data




No comments:

Post a Comment