Start and Verify the NFS Gateway Service
Three daemons are required to provide NFS service: rpcbind
(or portmap), mountd and nfsd. The NFS gateway
process has both nfsd and mountd. It shares the HDFS root
"/" as the only export.
We recommend using the portmap included in NFS
gateway package, as shown below. The included portmap must be used on
some Linux systems, for example, SLES 11 and RHEL 6.2.
Stop
nfs/rpcbind/portmapservices provided by the platform:service nfs stopservice rpcbind stopStart the included
portmappackage (needs root privileges), using one of the following two commands:hadoop portmapOR
hadoop-daemon.sh start portmapStart
mountdandnfsd.No root privileges are required for this command. However, verify that the user starting the Hadoop cluster and the user starting the NFS gateway are the same.
hadoop nfs3OR
hadoop-daemon.sh start nfs3![[Note]](../common/images/admon/note.png)
Note If the
hadoop-daemon.shscript starts the NFS gateway, its log file can be found in the hadoop log folder (/var/log/hadoop).For example, if you launched the NFS gateway services as the root user, the log file would be found in a path similar to the following:
/var/log/hadoop/root/hadoop-root-nfs3-63ambarihdp21.logStop the NFS gateway services.
hadoop-daemon.sh stop nfs3hadoop-daemon.sh stop portmap
Next, verify the validity of NFS-related services.
Execute the following command to verify that all the services are up and running:
rpcinfo -p $nfs_server_ipYou should see output similar to the following:
program vers proto port 100005 1 tcp 4242 mountd 100005 2 udp 4242 mountd 100005 2 tcp 4242 mountd 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100005 3 udp 4242 mountd 100005 1 udp 4242 mountd 100003 3 tcp 2049 nfs 100005 3 tcp 4242 mountdVerify that the HDFS namespace is exported and can be mounted:
showmount -e $nfs_server_ipYou should see output similar to the following:
Exports list on $nfs_server_ip : / (everyone)

