You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by gdan2000 <gd...@gmail.com> on 2012/01/15 09:45:57 UTC

Incompatible namespaceIDs after formatting namenode

Hi

We just started implemented hadoop on our system for the first time(Cloudera
CDH3u2 )

After reformatting a namenode for a few times, DataNode is not coming up
with error "Incompatible namespaceIDs"

I found a note on this
http://pages.cs.brandeis.edu/~cs147a/lab/hadoop-troubleshooting/ but I'm
really not sure about removing data node directories.

How is it possible that data will not be lost? I have to do it on all
datanodes...

Please explain me how all this reformat tasks preserves user's data ?

-- 
View this message in context: http://old.nabble.com/Incompatible-namespaceIDs-after-formatting-namenode-tp33142065p33142065.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: Incompatible namespaceIDs after formatting namenode

Posted by Paolo Rodeghiero <pa...@gmail.com>.
Il 15/01/2012 09:45, gdan2000 ha scritto:
[...]
 > really not sure about removing data node directories.
 >
 > How is it possible that data will not be lost? I have to do it on all
 > datanodes...
 >
 > Please explain me how all this reformat tasks preserves user's data ?
 >

When you reformat the namenode, you are erasing and rebuilding what 
actually is the filesystem allocation table. As for traditional 
filesystems, you are not deleting the actual blocks.

Differently from the traditional scenario, the previously allocated 
space is not automatically reused, but datanodes that have blocks from 
the previous allocation will instead deny to link to the namenode.

I assume the main reason for this design choice is to preserve data from 
problems on name resolutions or configuration errors (i.e. the datanode 
trying to link to a wrong namenode)

Il 15/01/2012 21:16, Chen He ha scritto:
 > For short, here is a script that may be useful for your to remove hdfs
 > directory on DNs from your headnode.
[...]

You can also use slaves.sh in $HADOOP_HOME/bin to accomplish that:
it allows you to run a command on every slave node.

Cheers,
Paolo




Re: Incompatible namespaceIDs after formatting namenode

Posted by Chen He <ai...@gmail.com>.
For short, here is a script that may be useful for your to remove hdfs
directory on DNs from your headnode.

for each DN hostname
   do
      ssh root@[DN hostname] "rm [your hdfs
directory]/dfs/data/current/VERSION";
done

On Sun, Jan 15, 2012 at 7:22 AM, Uma Maheswara Rao G
<ma...@huawei.com>wrote:

> Since you already formatted NN, why do you think dataloss if you remove
> storage directories of DNs here?
> Since you formatted the NN, new namespaceID will be generated. When DNs
> registering to it, they will have still old NamespaceID, so, it will say
> incompatible namespaceIDs. So, here currently the solution is to remove the
> storage directories of all DNs.
>
> Regards,
> Uma
>
> ________________________________________
> From: gdan2000 [gdan2000@gmail.com]
> Sent: Sunday, January 15, 2012 2:15 PM
> To: core-user@hadoop.apache.org
> Subject: Incompatible namespaceIDs after formatting namenode
>
> Hi
>
> We just started implemented hadoop on our system for the first
> time(Cloudera
> CDH3u2 )
>
> After reformatting a namenode for a few times, DataNode is not coming up
> with error "Incompatible namespaceIDs"
>
> I found a note on this
> http://pages.cs.brandeis.edu/~cs147a/lab/hadoop-troubleshooting/ but I'm
> really not sure about removing data node directories.
>
> How is it possible that data will not be lost? I have to do it on all
> datanodes...
>
> Please explain me how all this reformat tasks preserves user's data ?
>
> --
> View this message in context:
> http://old.nabble.com/Incompatible-namespaceIDs-after-formatting-namenode-tp33142065p33142065.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>

RE: Incompatible namespaceIDs after formatting namenode

Posted by Uma Maheswara Rao G <ma...@huawei.com>.
Since you already formatted NN, why do you think dataloss if you remove storage directories of DNs here?
Since you formatted the NN, new namespaceID will be generated. When DNs registering to it, they will have still old NamespaceID, so, it will say incompatible namespaceIDs. So, here currently the solution is to remove the storage directories of all DNs.

Regards,
Uma

________________________________________
From: gdan2000 [gdan2000@gmail.com]
Sent: Sunday, January 15, 2012 2:15 PM
To: core-user@hadoop.apache.org
Subject: Incompatible namespaceIDs after formatting namenode

Hi

We just started implemented hadoop on our system for the first time(Cloudera
CDH3u2 )

After reformatting a namenode for a few times, DataNode is not coming up
with error "Incompatible namespaceIDs"

I found a note on this
http://pages.cs.brandeis.edu/~cs147a/lab/hadoop-troubleshooting/ but I'm
really not sure about removing data node directories.

How is it possible that data will not be lost? I have to do it on all
datanodes...

Please explain me how all this reformat tasks preserves user's data ?

--
View this message in context: http://old.nabble.com/Incompatible-namespaceIDs-after-formatting-namenode-tp33142065p33142065.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.