Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the following sites to install and configure Hadoop in Ubuntu 10.10

However, when I try to format the Hadoop file-system, I get the following errors.

amathew@amathew-Dimension-3000:~$ cd /usr/local/hadoop
amathew@amathew-Dimension-3000:/usr/local/hadoop$ bin/hadoop namenode -format
11/04/16 21:23:07 INFO namenode.NameNode: STARTUP_MSG: 
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = amathew-Dimension-3000/
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.2
STARTUP_MSG:   build = -r 911707; compiled by 'chrisdo' on Fri Feb 19 08:07:34 UTC 2010
11/04/16 21:23:08 INFO namenode.FSNamesystem: fsOwner=amathew,amathew,adm,dialout,cdrom,plugdev,lpadmin,admin,sambashare
11/04/16 21:23:08 INFO namenode.FSNamesystem: supergroup=supergroup
11/04/16 21:23:08 INFO namenode.FSNamesystem: isPermissionEnabled=true
11/04/16 21:23:08 ERROR namenode.NameNode: Cannot create directory /usr/local/hadoop-datastore/hadoop/dfs/name/current
    at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(
    at org.apache.hadoop.hdfs.server.namenode.FSImage.format(
    at org.apache.hadoop.hdfs.server.namenode.FSImage.format(
    at org.apache.hadoop.hdfs.server.namenode.NameNode.format(
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(

11/04/16 21:23:08 INFO namenode.NameNode: SHUTDOWN_MSG: 
SHUTDOWN_MSG: Shutting down NameNode at amathew-Dimension-3000/

Can anyone help with these error messages, namely ERROR namenode.NameNode: Cannot create directory /usr/local/hadoop-datastore/hadoop/dfs/name/current.

$ sudo mkdir /usr/local/hadoop/datastore
$ sudo chown  hadoop:hadoop /usr/local/hadoop/datastore
$ sudo chmod 750 /usr/local/hadoop/datastore
share|improve this question
You aren't creating the directory hadoop-datastore. Either that, or you made a typo in the last three commands, typing /usr/local/hadoop/datastoreinstead of /usr/local/hadoop-datastore – theTuxRacer Apr 17 '11 at 2:51
up vote 4 down vote accepted

Hadoop can not create /usr/local/hadoop-datastore/hadoop/dfs/name/current directory.

Try runinng this:

sudo bin/hadoop namenode -format

Running the hadoop executable using sudo.I'm not sure but I think it didn't work for me when I installed hadoop.If so do this:

sudo su


bin/hadoop namenode -format
share|improve this answer

Assuming hadoop is installed in $HADOOP_HOME, we have to modify the directory name in /$HADOOP_HOME/conf/core-site.xml


$HOME has read, write permissions and hence the directories can be created.

share|improve this answer

This is failing because of a permission's issue.

Use below:

chmod -R 777 [tmp folder-name specified in core-site.xml]

then format namenode:

hadoop namenode -format 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.