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:
Stop
nfs/rpcbind/portmap
services provided by the platform:service nfs stop
service rpcbind stop
Start the included
portmap
package (needs root privileges), using one of the following two commands:hadoop portmap
OR
hadoop-daemon.sh start portmap
Start
mountd
andnfsd
.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 nfs3
OR
hadoop-daemon.sh start nfs3
Note If the
hadoop-daemon.sh
script 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.log
Stop the NFS gateway services.
hadoop-daemon.sh stop nfs3
hadoop-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_ip
You 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 mountd
Verify that the HDFS namespace is exported and can be mounted:
showmount -e $nfs_server_ip
You should see output similar to the following:
Exports list on $nfs_server_ip : / (everyone)