Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to Sync a new Secondary Namenode to the Cluster?

avatar
Contributor

I have 5 node cluster with 1 name node and 4 data nodes. Right now both my secondary name node and primary name node are on the same machine. I want to add a new secondary name node and sync it up with the rest of the hosts.

What is the best possible way to do this?

I tried using Ambari's "move secondary name node" wizard and it asked me to copy data into /hadoop/hdfs/namesecondary directory (which is on the boot disk with low disk space) in the new host. But I want to move it into the external hard disks I mounted on /mnt/data1-4. There are about 72 files in /hadoop/hdfs/namesecondary/current which I am not sure how to distribute into the /mnt disks.

Can some suggest what is the right way to do this?

2 REPLIES 2

avatar
@Sree Kupp

If the NameNode host has hardware problems and you need to move the NameNode to another host, you can do so as follows:

  1. If the host to which you want to move the NameNode is not in the cluster, follow the instructions in Adding a Host to the Cluster to add the host.
  2. Stop all 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 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 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.
  13. Go to the HDFS service. The NameNode, Secondary NameNode, and DataNode roles should each show a process state of Started, and the HDFS service should show a status of Good.

You can't disturb between multiple node unless you want to store HDFS metadata in multiple location which will be same.

avatar
Contributor

Thanks @Sridhar Reddy. My name node is doing good. I only wanted to move the name node which I did using the "Move Snamenode" wizard on Ambari. I want to sync up the name node with the cluster and am not sure how to do that.