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
- Check the permission of the shared NFS directories on the NFS server to ensure that the server can access NameNode in the MRS cluster.
- Log in to the active NameNode node as user root.
- 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
- 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
- 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.
- Log in to FusionInsight Manager and choose Cluster > Services > HDFS. Click Configurations then All Configurations.
- 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
- Click OK. On the Dashboard tab page, choose More > Restart Service to restart the service.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot