Help Center/ MapReduce Service/ Component Operation Guide (Normal)/ Using HDFS/ HDFS O&M Management/ Configuring the NFS Server to Store NameNode Metadata
Updated on 2025-10-11 GMT+08:00

Configuring the NFS Server to Store NameNode Metadata

Scenario

Before deploying a cluster, you can deploy a Network File System (NFS) server based on requirements to store NameNode metadata to enhance data reliability.

If the NFS server has been deployed and NFS services are configured, you can follow operations in this section to configure NFS on the cluster. These operations are optional.

Notes and Constraints

This section applies to MRS 3.x or later.

Procedure

  1. Check the permission of the shared NFS directories on the NFS server to ensure that the server can access NameNode in the MRS cluster.
  2. Log in to the active NameNode node as user root.
  3. Run the following commands to create a directory and assign it write permissions:

    mkdir ${BIGDATA_DATA_HOME}/namenode-nfs
    chown omm:wheel ${BIGDATA_DATA_HOME}/namenode-nfs
    chmod 750 ${BIGDATA_DATA_HOME}/namenode-nfs

  4. Run the following command to mount the NFS to the active NameNode:

    mount -t nfs -o rsize=8192,wsize=8192,soft,nolock,timeo=3,intr IP address of the NFS server:Shared directory ${BIGDATA_DATA_HOME}/namenode-nfs

    For example, if the IP address of the NFS server is 192.168.0.11 and the shared directory is /opt/Hadoop/NameNode, run the following command:

    mount -t nfs -o rsize=8192,wsize=8192,soft,nolock,timeo=3,intr 192.168.0.11:/opt/Hadoop/NameNode ${BIGDATA_DATA_HOME}/namenode-nfs

  5. Perform 2 to 4 on the standby NameNode.

    The names of the shared directories (for example, /opt/Hadoop/NameNode) created on the NFS server by the active and standby NameNodes must be different.

  6. Log in to FusionInsight Manager and choose Cluster > Services > HDFS. Click Configurations then All Configurations.
  7. Search for the parameter dfs.namenode.name.dir, add the ${BIGDATA_DATA_HOME}/namenode-nfs path to its value, separate multiple paths with commas (,), and click Save.

    Table 1 Parameters

    Parameter

    Description

    Default Value

    dfs.namenode.name.dir

    Directory for the DFS NameNode to store FSImages in the local file system.

    If this parameter is set to a list of directories separated by commas (,), FSImages are copied to all directories in the list for redundancy backup.

    ${BIGDATA_DATADIR} indicates the root directory specified during system installation for storing cluster data. Exercise caution when you modify the parameter. If the configuration is incorrect, the services are unavailable.

    ${BIGDATA_DATADIR}/namenode

  8. Click OK. On the Dashboard tab page, choose More > Restart Service to restart the service.