Skip to content

Hadoop – Namenode is in safe mode

Advertisement

Namenode loads the filesystem state from fsimage and stays in safe mode and wait for data nodes to report their blocks. Safemode is a read-only mode for HDFS cluster, so that it does not prematurely start replicating the blocks. Use following command to let the namenode leave safemode forcefully.

$ hadoop dfsadmin -safemode leave

In newer versions of hadoop command is deprecated. You can use hdfs command instead of hadoop. For example:

$ hdfs dfsadmin -safemode leave

You must run hadoop fsck so sort out any inconsistencies created in the hdfs due to above command.

Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

3 Comments

  1. I Installed and set up Hadoop 2.8.2 on ubuntu 16.0.4 and all nodes are running while executing hadoop fs -ls i am facing this issue [warn util.nativecodeloader: unable to load native-hadoop library for your platform… using builtin-java classes where applicable ls: `.’: no such file or directory]

    thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top