■ Requirement : Install & Configure NFSv4
■ OS Environment : NFS client - RHEL 5, NFS SERVER - RHEL 6
■ Application: nfsv4
■ Assumption :
- Client IP= 10.65.211.15,
- NFS server IP =10.65.211.12,
- FS Share Directory : /var/nfs4testing
■ Implementation Steps :
How NFS Works :
NFS consists of at least two main parts: a server and one or more clients. The client remotely accesses the data that is stored on the server machine. In order for this to function properly a few processes have to be configured and running.
The server has to be running the following daemons:
Daemon Description :
nfsd : The NFS daemon which services requests from the NFS clients.
mountd : The NFS mount daemon which carries out the requests that nfsd passes on to it.
rpcbind :This daemon allows NFS clients to discover which port the NFS server is using.
The client can also run a daemon, known as nfsiod. The nfsiod daemon services the requests from the NFS server. This is optional, and improves performance, but is not required for normal and correct operation.
A. NFS server configuration for nfs4 :
$ yum install nfs-utils nfs4-acl-tools portmap
$ cat /etc/exports
/var/nfs4testing/ 10.65.211.15(rw,sync,fsid=0)
$chkconfig nfs on
$ chkconfig portmap on
$ cat /etc/hosts.deny | grep portmap
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
portmap:ALL
$ cat /etc/hosts.allow| grep 10.65.211
portmap:10.65.211.0/24
portmap:10.65.192.0/24
Verify that following daemons are running on server :
$ rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 896 status
100024 1 tcp 899 status
100011 1 udp 1000 rquotad
100011 2 udp 1000 rquotad
100011 1 tcp 1003 rquotad
100011 2 tcp 1003 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 60156 nlockmgr
100021 3 udp 60156 nlockmgr
100021 4 udp 60156 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 51539 nlockmgr
100021 3 tcp 51539 nlockmgr
100021 4 tcp 51539 nlockmgr
100005 1 udp 603 mountd
100005 1 tcp 606 mountd
100005 2 udp 603 mountd
100005 2 tcp 606 mountd
100005 3 udp 603 mountd
100005 3 tcp 606 mountd
B. NFS client configure for NFSv4 : -
$ yum install nfs-utils
$ mount -t nfs 10.65.211.12:/ /mounted/