Adding and Configuring an NFS Gateway

The NFSv3 gateway allows a client to mount HDFS as part of the client's local file system. The gateway machine can be any host in the cluster, including the NameNode, a DataNode, or any HDFS client. The client can be any NFSv3-client-compatible machine.
After mounting HDFS to his or her local filesystem, a user can:
  • Browse the HDFS file system as though it were part of the local file system
  • Upload and download files from the HDFS file system to and from the local file system.
  • Stream data directly to HDFS through the mount point.

File append is supported, but random write is not.

Adding and Configuring an NFS Gateway Using Cloudera Manager

Minimum Required Role: Cluster Administrator (also provided by Full Administrator)

The NFS Gateway role implements an NFSv3 gateway. It is an optional role for the HDFS service.

Requirements and Limitations

  • The nfs-utils OS package is required for a client to mount the NFS export and to run commands such as showmount from the NFS Gateway.
  • If any NFS server is already running on the NFS Gateway host, it must be stopped before the NFS Gateway role is started.
  • There are two configuration options related to NFS Gateway role: Temporary Dump Directory and Allowed Hosts and Privileges. The Temporary Dump Directory is automatically created by the NFS Gateway role and should be configured before starting the role.
  • The Access Time Precision property in the HDFS service must be enabled.

Adding and Configuring the NFS Gateway Role

  1. Go to the HDFS service.
  2. Click the Instances tab.
  3. Click Add Role Instances.
  4. Click the text box below the NFS Gateway field. The Select Hosts dialog box displays.
  5. Select the host on which to run the role and click OK.
  6. Click Continue.
  7. Click the NFS Gateway role.
  8. Click the Configuration tab.
  9. Select Scope > NFS Gateway.
  10. Select Category > Main.
  11. Ensure that the requirements on the directory set in the Temporary Dump Directory property are met.

    To apply this configuration property to other role groups as needed, edit the value for the appropriate role group. See Modifying Configuration Properties Using Cloudera Manager.

  12. Optionally edit Allowed Hosts and Privileges.

    To apply this configuration property to other role groups as needed, edit the value for the appropriate role group. See Modifying Configuration Properties Using Cloudera Manager.

  13. Enter a Reason for change, and then click Save Changes to commit the changes.
  14. Click the Instances tab.
  15. Check the checkbox next to the NFS Gateway role and select Actions for Selected > Start.