NFS- ഫയല്‍ ഷെയറിങ്ങ്

NFS Sharing

Network File System Sharing is used for sharing the files/directory all through the network

port 2049

files used are

@ /usr/sbin

1.Server — place from which we need to share the directory

—->yum install -y nfs-utils*
—->service nfs restart
—->chkconfig nfs on
—->vim /etc/exports

In this file we say about files we need to share ,the mode in which the files are to shared and network to which the files are to be shared

some of the modes in which directories can be shared are

—->exportfs -r

—-****we should set the proper context ,sebool and setfacl for needed user

—->getsebool -a | grep nfs

this will list the needed Boolean we must set it according to the needs

—->setfacl -m u:nfsnobody:rwx /nfs

this will allow the nfsnobody user to use the /nfs directory this is needed if we are giving the write option to the directory

if more problems occur while sharing the directory we should also check the context for selinux or disable the selinux

showmount -e
will list the all the nfs shared directory by the server

2.Client — where we will mount the shared directories
there are multiple ways to mount the directory

—->yum install -y nfs*
—->service nfs restart
—->chkconfig nfs on

a.every shared folders will be available at /net every time as readonly type we use that as following ,for first example of sharing

—->cd /net
—->cd cd nfs

b.We can also mount the directory by simple mount command
mount nfs:// /data

one of the main default of this system is that if we give the entry for mount in fstab and server goes down and if we restart the client ,the client will have boot break to over come this problem we use autofs mounting systems

c.using autofs mounting system

here first we will edit /etc/auto.master file

—->vim /etc/auto.master

/data /etc/auto.nfs

—->vim /etc/auto.nfs

nfs -rw

—–>service autofs reload
—–>chkconfig autofs on

here after reloading the autofs service we could browse to that folder
—->cd /data
—->cd nfs

ഒരു മറുപടി കൊടുക്കുക

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / മാറ്റുക )

Twitter picture

You are commenting using your Twitter account. Log Out / മാറ്റുക )

Facebook photo

You are commenting using your Facebook account. Log Out / മാറ്റുക )

Google+ photo

You are commenting using your Google+ account. Log Out / മാറ്റുക )