0% found this document useful (0 votes)
19 views2 pages

Nfs

NFS-Linux-Handson

Uploaded by

sourabh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Nfs

NFS-Linux-Handson

Uploaded by

sourabh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

NFS (Network Filesystem) and /etc/exports

NFS enables you to mount a file system on a remote computer as if it were local to
your own system. you can then directly access any of the files on the remote
filesystem. this has the advantage of allowing different systems on a network to
access the same files directly without each having to keep its own copy. only one
copy would be on a remote file system, which each computer could then access.

NFS Daemons-:
NFS operates over a TCP/IP network. the remote computer that holds the file system
makes it available to other computers on the network. it does so by exporting the
file system, which entails making entries in an NFS configuration file called
/etc/exports, as well as by running several daemons to supports access by other
systems. these include "rpc.mountd, rpc.nfsd, and rpc.portmapper". access to your
NFS server can be controlled by the /etc/hosts.allow and /etc/hosts.deny files. the
NFS daemons are listed here.

1. rpc.nfsd-: receives NFS requests form remote systems and translates them into
requests for the local system.

2. rpc.mountd-: performs requested moun and unmount operations.

3. rpc.portmapper-: maps remote requests to the appropriate NFS daemon.

4. rpc.rquotad-: provides user disk quota management.

5. rpc.statd-: provides locking services when a remote host reboot.

6. rpc.lockd-: handles lock recovery for the systems that have gone down.

configuring NFS
first check the RPM
#rpm -q nfs-utils
install the RPM
#yum install system-config-nfs.noarch

server setting
first make the folder which you want to share
#mkdir /share
#cd /share
#touch a1 a2 a3
#chmod o+w a1 a2 a3
now open the configuration file
#vi /etc/exports
making the following entry
/share 172.24.0.0/255.255.0.0(rw,sync)
save and exit

/share will be shared by the entire network.

now start the service


#service portmap restart
#service portmap on
#service nfs restart
#chkconfig nfs on

client setting
mount the /share directory on client machine.
#mount 172.24.254.254:/share /mnt
where /mnt is a mount point.

for sharing a particular ip address


server setting
#vi /etc/exports
/share 172.24.0.3/255.255.0.0(rw,sync)
/share 172.24.0.4/255.255.0.0(rw,sync)
save and exit

sharing for two different network


#vi /etc/exports
/share 172.24.0.0/255.255.0.0(rw,sync)
/share 172.25.0.0/255.255.0.0(rw,sync)

for all world


#vi /etc/exports
/share *(rw,sync)

if we give a space between the network range and (rw,sync), then it will mount for
everyone.
#vi /etc/exports
/share 172.24.0.0/255.255.0.0 (rw,sync)

You might also like