transfer namenode from one machine to another in cdh5 hdfs

Official website steps:

If the NameNode host has a hardware problem and you need to move the NameNode to another host, you can do this:
If the host to which you want to move the NameNode is not in the cluster, follow the instructions in Adding a Cluster to a Cluster to add the host.
Stop all cluster services.
Back up the dfs.name.dir directory on the existing NameNode host. Make sure you backup fsimage and edit files. They should be the same in all directories specified by the dfs.name.dir property.
Copy the files you have backed up from the dfs.name.dir directory on the old NameNode host to the host where you want to run the NameNode.
Go to HDFS service.
Click the Instances tab.
Check the box next to the NameNode role instance and click the Delete button. Click Delete again to confirm.
On the View Configuration Changes page that appears, click Skip.
Click Add to add the NameNode role instance.
Select the host on which to run the NameNode and click Continue.
Specify where to copy the data to the dfs.name.dir directory on the new host and click Accept Changes.
Start the cluster service. After the HDFS service starts, Cloudera Manager distributes the new configuration file to the DataNodes, which will be configured with the IP address of the new NameNode host.
Go to HDFS service. The NameNode, Secondary NameNode, and DataNode roles should show started process status, respectively, and the HDFS service should show good status.

Reference link:

http://www.cloudera.com/documentation/manager/5-0-x/Cloudera-Manager-Managing-Clusters/cm5mc_move_nn.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324983324&siteId=291194637