Moving a NameNode to a different host using Cloudera Manager

You can use Cloudera Manager to manually move a NameNode from one host to another.

This procedure requires cluster downtime.
  1. If the host to which you want to move the NameNode is not in the cluster, add the required host.
  2. Stop all the cluster services.
  3. Make a backup of the dfs.name.dir directories on the existing NameNode host.
    Make sure you back up the fsimage and edits files. They should be the same across all of the directories specified by the dfs.name.dir property.
  4. Copy the files you backed up from dfs.name.dir directories on the old NameNode host to the host where you want to run the NameNode.
  5. Go to the HDFS service.
  6. Click the Instances tab.
  7. Select the checkbox next to the NameNode role instance and then click the Delete button. Click Delete again to confirm.
  8. In the Review configuration changes page that appears, click Skip.
  9. Click Add Role Instances to add a NameNode role instance.
  10. Select the host where you want to run the NameNode and then click Continue.
  11. Specify the location of the dfs.name.dir directories where you copied the data on the new host, and then click Accept Changes.
  12. Start the cluster services.
    After the HDFS service has started, Cloudera Manager distributes the new configuration files to the DataNodes, which will be configured with the IP address of the new NameNode host.