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
nfsserver
is running the Gateway and there are users belonging to groupsnfs-users1
andnfs-users2
, then set the following values incore-site.xml
on the NameNode.-
Set the value of the
hadoop.proxyuser.nfsserver.groups
property in NFS Gateway Advanced Configuration Snippet (Safety Valve) for hdfs-site.xml.For example,nfs-users1,nfs-users2
. Thenfsserver
user is allowed to proxy all members of thenfs-users1
andnfs-users2
groups. Set this to*
to allownfsserver
user to proxy any group. -
Set the value of the
hadoop.proxyuser.nfsserver.hosts
property in NFS Gateway Advanced Configuration Snippet (Safety Valve) for hdfs-site.xml.For example,nfs-client-host1.com
is 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 Precision
property. -
Specify the access time precision. For example, 1 hour.
-
Search for the
Temporary Dump Directory
property, and set the value as/tmp/.hdfs-nfs
. -
Search for the
Allowed Hosts and Privileges
property, and set the value as* rw
. - Restart the NFS Gateway.
- Optional:
Customize log settings by modifying the
log4j.property
file.- 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.rtmax
anddfs.nfs.wtmax
properties.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.