Configuring NFS gateway to serve HDFS
In this recipe, we will configure NFS server to export HDFS as a filesystem which can be mounted onto another system and the native operating system commands, such as ls
, cp
, and so, on will work efficiently.
As we have seen upto now, the HDFS filesystem is a filesystem which is not understood by Linux shell commands such, as cp
, ls
, and mkdir
, and so the user must use Hadoop commands to perform file operations.
Getting ready
Make sure that the user has a running cluster with at least HDFS configured and working perfectly. Users are expected to have a basic knowledge about Linux and NFS server. The NFS Gateway supports NFSv3 and allows HDFS to be mounted as part of the client's local filesystem.
How to do it...
Connect to the
master1.cyrus.com
master node and switch to userhadoop
.The user running the NFS-gateway must be able to proxy all the users using the NFS mounts. Edit the
core-site.xml
file and add the configuration lines as shown here:<
property...