How to restart failed Namenode?

0 votes

I have created a hadoop cluster with shared storage for having HA following edureka article in https://www.edureka.co/blog/how-to-set-up-hadoop-cluster-with-hdfs-high-availability/

I noticed that Namenode on one of the host failed and the other namenode became active. So currently it's running only one namenode. There are no bad blocks or loss of data. How do I restart the namenode failed on the host in standby mode without losing any data? Any backup steps need to be followed to be safe before proceeding further?

Jul 23 in Big Data Hadoop by Karan
24 views

1 answer to this question.

0 votes

You need to solve the issue which caused your active name node to stop. Once that is done please run the command 

hdfs namenode -bootstrapStandby

 on the NameNode still down, then turn in on again. This node becomes Standby NameNode

Please follow the below steps:

Copy the HDFS Metadata from active name node to standby namenode.

Command

hdfs namenode -bootstrapStandby

Copy the HDFS Meta data from Active name node to Standby Name node

Copy the HDFS Metadata from Active name node to Standby Namenode. Once you run this command, you will get the information from which node and location the metadata is copying and whether it is copying successfully or not.

Information of Active namenode details

Information on Active namenode details.

Once Metadata is copied from Active namenode to standby namenode, you will get the message shown below in the screenshot.

Information regarding HDFS in Standby Name node

Information regarding HDFS in Standby Namenode.

Start the namenode daemon in Standby namenode machine.

Command

hadoop-daemon.sh start namenode

Now the name node which was down will become passive name node.

answered Jul 23 by Ishan

Related Questions In Big Data Hadoop

+1 vote
2 answers

Failed to restart Hadoop namenode using cloudera quickstart

You can use cloudera manager to manage ...READ MORE

answered Mar 19, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
628 views
0 votes
1 answer

How to configure secondary namenode in Hadoop 2.x ?

bin/hadoop-daemon.sh start [namenode | secondarynamenode | datanode ...READ MORE

answered Apr 6, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
341 views
0 votes
2 answers

How to exit NameNode safe mode?

hadoop dfsadmin -safemode leave READ MORE

answered Apr 11 in Big Data Hadoop by anonymous
745 views
0 votes
1 answer

After installing Hadoop on Windows7, NameNode failed to start

You need to install Hadoop winutils to ...READ MORE

answered May 3, 2018 in Big Data Hadoop by Shubham
• 13,290 points
1,767 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,490 points
2,315 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,490 points
237 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
11,915 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
881 views
0 votes
3 answers

How to change the delimiter in Sqoop?

--fields-terminated-by <char> READ MORE

answered Jun 25 in Big Data Hadoop by anonymous
1,031 views
0 votes
2 answers

Hey for all, how to get on large data i want use in hadoop?

Hi, To work with Hadoop you can also ...READ MORE

answered Jul 30 in Big Data Hadoop by Sunny
39 views