Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How to verify if NameNode is good to leave safemode?

avatar
Super Collaborator

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

avatar
Master Mentor
@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

avatar
Master 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

avatar
Super Collaborator

Thanks, but how to ensure that?

avatar
Master Mentor
@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"

avatar
Master Mentor

@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