For every ViewFs mount entry to export using the NFS Gateway, you must specify an NFS
export point and mount it to a corresponding directory path on the NFS Gateway.
The file with the ViewFs mount table entries must already be
created.
You can export only those ViewFs mounts that have HDFS as the underlying file
system.
-
Configure the proxy user for the NFS Gateway and the various Gateway
settings.
-
Start the following daemons to run the NFS services on the Gateway:
rpcbind
(or portmap
),
mountd
, and nfsd
.
-
In the NFS Gateway node, specify an export point corresponding to each ViewFs
mount that you want to export.
Consider the following example of a ViewFs mount table
entry:
<property>
<name>fs.viewfs.mounttable.ClusterX.link./home</name>
<value>hdfs://nn1-clusterx.example.com:8020/home</value>
</property>
You
can specify a corresponding NFS export point as
follows:
<property>
<name>nfs.export.point</name>
<value>/home</value>
</property>
-
Verify if the exported namespace can be mounted.
showmount -e $nfs_server_ip
| Note |
---|
The IP address of the NFS Gateway need not be the same as that of the
NameNode. |
-
Mount the exported namespace to a corresponding path on the NFS Gateway.
For the export point example in step 3, you can create a mount as
follows:
mount -t nfs -o vers=3,proto=tcp,nolock,noacl,sync nfs_server_ip:/home /mount_dir