Configure the NFS Gateway
You must ensure that the proxy user for the NFS Gateway can proxy all the users accessing the NFS mounts. In addition, you must configure settings specific to the Gateway.
-
Ensure that the proxy user for the NFS Gateway can proxy all the users
accessing the NFS mounts.
In non-secure mode, the user running the Gateway is the proxy user, while in secure mode the user in Kerberos keytab is the proxy user.If a user
nfsserveris running the Gateway and there are users belonging to groupsnfs-users1andnfs-users2, then set the following values incore-site.xmlon the NameNode.-
Set the value of the
hadoop.proxyuser.nfsserver.groupsproperty in NFS Gateway Advanced Configuration Snippet (Safety Valve) for hdfs-site.xml.For example,nfs-users1,nfs-users2. Thenfsserveruser is allowed to proxy all members of thenfs-users1andnfs-users2groups. Set this to*to allownfsserveruser to proxy any group. -
Set the value of the
hadoop.proxyuser.nfsserver.hostsproperty in NFS Gateway Advanced Configuration Snippet (Safety Valve) for hdfs-site.xml.For example,nfs-client-host1.comis the host where the NFS Gateway is running. Set this to*to allow requests from any hosts to be proxied.
-
Set the value of the
-
Configure settings for the NFS Gateway.
The NFS Gateway uses the same settings that are used by the NameNode and DataNode. Configure various properties based on your application's requirements:
- In the Cloudera Manager Admin Console, go to Clusters > HDFS service.
-
Navigate to the Configurations tab and search
for the
Access Time Precisionproperty. -
Specify the access time precision. For example, 1 hour.
-
Search for the
Temporary Dump Directoryproperty, and set the value as/tmp/.hdfs-nfs. -
Search for the
Allowed Hosts and Privilegesproperty, and set the value as* rw. - Restart the NFS Gateway.
- Optional:
Customize log settings by modifying the
log4j.propertyfile.- To change the trace level, go to Configuration > NFS Gateway Logging Advanced Configuration
Snippet (Safety Valve), and add
log4j.logger.org.apache.hadoop.hdfs.nfs=DEBUG - To view more information about ONCRPC requests, go to Configuration > NFS Gateway Logging Advanced Configuration
Snippet (Safety Valve), and add
log4j.logger.org.apache.hadoop.oncrpc=DEBUG
- To change the trace level, go to Configuration > NFS Gateway Logging Advanced Configuration
Snippet (Safety Valve), and add
-
Specify JVM heap space (HADOOP_NFS3_OPTS) for the NFS Gateway.
You can increase the JVM heap allocation for the NFS Gateway using this option. To set this option, go to Configuration > Java Heap Size of NFS Gateway in Bytes, and enter the value.
-
To improve the performance of large file transfers, you can increase the values
of the
dfs.nfs.rtmaxanddfs.nfs.wtmaxproperties.These properties are configuration settings on the NFS Gateway server that change the maximum read and write request size supported by the Gateway. The default value for both settings is 1MB.
