Support Questions
Find answers, ask questions, and share your expertise

How to verify if NameNode is good to leave safemode?

Solved Go to solution

How to verify if NameNode is good to leave safemode?

Expert Contributor

During maintenance of our production cluster, one of the the datanode (of 100+ datanodes) went bad. We decided to start the cluster leaving that node.

However Namenode was stuck in safemode with below message:

Safe mode is ON. The reported blocks 8900092 needs additional 6476 blocks to reach the threshold 1.0000 of total blocks 8906567.

Is it okay to force NN out of safe mode?

What are the things to check to ensure that?

My understanding is, it is enough to check that there are no missing and corrupt files using hadoop fsck. Please confirm.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to verify if NameNode is good to leave safemode?

@Rahul Pathak

My understanding is, it is enough to check that there are no missing and corrupt files using hadoop fsck - This is correct.

hadoop dfsadmin -safemode leave

If you are not sure then "engage support"

View solution in original post

4 REPLIES 4

Re: How to verify if NameNode is good to leave safemode?

Mentor

Those blocks are already replicated or will be reconstructed so from the survivng nodes

In order to forcefully let the namenode leave safemode, following command should be executed depending on the version of

hadoop bin/hadoop dfsadmin -safemode leave

hdfs dfsadmin -safemode leave

Re: How to verify if NameNode is good to leave safemode?

Expert Contributor

Thanks, but how to ensure that?

Re: How to verify if NameNode is good to leave safemode?

@Rahul Pathak

My understanding is, it is enough to check that there are no missing and corrupt files using hadoop fsck - This is correct.

hadoop dfsadmin -safemode leave

If you are not sure then "engage support"

View solution in original post

Re: How to verify if NameNode is good to leave safemode?

@Rahul Pathak

Safe mode is ON. The reported blocks 8900092 needs additional 6476 blocks to reach the threshold 1.0000 of total blocks 8906567

See this article https://community.hortonworks.com/articles/1949/how-to-leave-hdfs-and-name-node-safemode.html