title: Create directory in hadoop filesystem
body: <p>I'm new to hadoop. I am trying to create a directory in hdfs but I am not able to create.</p>
  
  <p>I have logged into "hduser" hence I assumed /home/hduser" pre-exists as Unix fs. So I tried to create hadoop directory using below command.  </p>
  
  <pre><code>[hduser@Virus ~]$ hadoop fs -mkdir /home/hduser/mydata/
  14/12/03 15:04:53 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  mkdir: `/home/hduser/mydata/': No such file or directory
  </code></pre>
  
  <p>After online search, i thought of it is possible that hadoop is not able to understand "/home/hduser" or as I m using hadoop2 where mkdir wont work like Unix command "madir -p" (recursively). Hence I tried to create  "/mydata" but no luck.</p>
  
  <pre><code>[hduser@Virus ~]$ hadoop fs -mkdir /mydata
  14/12/03 15:09:26 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  mkdir: Cannot create directory /mydata. Name node is in safe mode.
  </code></pre>
  
  <p>I tried to leave the safemode but still issue persists. </p>
  
  <pre><code>[hduser@Virus ~]$ hdfs dfsadmin -safemode leave
  14/12/03 15:09:13 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  Safe mode is OFF
  </code></pre>
  
  <p>I also tried with "/user/mydata" as "/user" is the directory which hadoop took as home. </p>
  
  <pre><code>[hduser@Virus ~]$ hadoop fs -mkdir /user/mydata
  14/12/03 15:36:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  mkdir: Cannot create directory /user/mydata. Name node is in safe mode.
  </code></pre>
  
  <p>Now how to debug further?</p>