Monday, 20 July 2015

INSTALLATION OF NFS SERVER AND How to Mount Network Attached Storage

Let your system ip
nas ip
1.If rpcbind corrupted in your system first remove it.
#yum remove rpcbind
2.Download and install NFS
#yum install nfs* -y
3.Verify that the nfs services are installed.
#rpm -qa nfs-utils
4.Verify that the rpcbind package is installed.
#rpm -qa rpcbind
Note:Network attached storage which i am mounting only runs on Network File system version 3 and it also needs Portmap which is the resource of rpcbind.
5.Edit the exports file to export any directory/file you want to.
#vi /etc/exports
after typing this save it by :wq.
/tmp:Directory you want to export to nas. address of nas.
rw:giving read and write permission to nas.
Sync:Synchronize shared directory whenever create new files/folders.
no_root_squash:Enable root privilege  (Users can read, write and delete the files in the shared directory)
6.Edit fstab file.
#vi /etc/fstab
Append below line. /tmp nfs defaults 0 0
After typing this save it by :wq

7.Restart the services NFS and Portmap.
#service nfs restart
#service portmap restart

8.Check NAS is in export list of your system ip address.
#showmount -e
9.Mount nas through this command.
#mount -v -t nfs -o vers=3 /tmp
disk:The directory in nas which you want to mount.
10.After this check nas is mounted.
#df -h
hence mounted.

No comments:

Post a Comment