Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

@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

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

Expert Contributor

Thanks, but how to ensure that?

@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"

@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

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.