You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by cho ju il <tj...@kgrid.co.kr> on 2014/07/07 10:00:09 UTC

How do I recover the namenode?

cluster is.. 
2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
 
I regularly back up the metadata(fsimage) file. ( http://[namenode address]:50070/imagetransfer?getimage=1&amp;txid=latest )
 
How do I recover the namenode by using the metadata(fsimage)? 
 
 
 
 
 
 
 
 
 
 
 

Re: How do I recover the namenode?

Posted by Stanley Shi <ss...@gopivotal.com>.
This is not recommended.
You only backup the fsimage file, the data blocks, which are stored in
datanode, are not stored.
The chances may be if you removed some file after your fsimage backup,
those data blocks belonging to this file will be removed from all
datanodes; in this case, your namenode will report that blocks are missing;



1. Since you're using HA, lots of the editlogs are stored in the journal
node; the fsimage you have may not be exactly the one you want;



Regards,
*Stanley Shi,*



On Tue, Jul 8, 2014 at 8:12 AM, cho ju il <tj...@kgrid.co.kr> wrote:

>
>
> Thank you for answer.
>
>
>
> However, my Hadoop version is 2.4.1.
>
> Cluster does not have secondary namenode .
>
>
>
> How do I recover the namenode( hadoop version 2.4.1 ) by using the
> metadata(fsimage) ?
>
>
>
>
>
>
>
> -----Original Message-----
> *From:* "Raj K Singh"<ra...@gmail.com>
> *To:* <us...@hadoop.apache.org>; "cho ju il"<tj...@kgrid.co.kr>;
> *Cc:*
> *Sent:* 2014-07-08 (화) 02:05:15
> *Subject:* Re: How do I recover the namenode?
>
> please follow along the steps
>
>
> • Shutdown all Hadoop daemons on all servers in the cluster.
> • Copy NameNode metadata onto the secondary NameNode and copy the entire
> directory tree to the secondary NameNode.
> • Modify the core-site.xml file, making the secondary NameNode server the
> new NameNode server.
> • Replicate that file to all servers in the cluster.
> • Start the NameNode daemon on the secondary NameNode server.
> • Restart the secondary NameNode daemon on the new NameNode server.
> • Start the DataNode daemons on all DataNodes.
> • Start the JobTracker daemon on the JobTracker node.
> • Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
> • From any node in the cluster, use the “hadoop dfs –ls” command to verify
> that the data file created by TeraGen exists.
> • Check the total amount of HDFS storage used.
> • Run “hadoop fsck /” to compare to results recorded before the NameNode
> was halted.
>
> ::::::::::::::::::::::::::::::::::::::::
> Raj K Singh
> http://in.linkedin.com/in/rajkrrsingh
> http://www.rajkrrsingh.blogspot.com
> Mobile Tel: +91 (0)9899821370
>
>
> On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:
>
> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>

Re: How do I recover the namenode?

Posted by Stanley Shi <ss...@gopivotal.com>.
This is not recommended.
You only backup the fsimage file, the data blocks, which are stored in
datanode, are not stored.
The chances may be if you removed some file after your fsimage backup,
those data blocks belonging to this file will be removed from all
datanodes; in this case, your namenode will report that blocks are missing;



1. Since you're using HA, lots of the editlogs are stored in the journal
node; the fsimage you have may not be exactly the one you want;



Regards,
*Stanley Shi,*



On Tue, Jul 8, 2014 at 8:12 AM, cho ju il <tj...@kgrid.co.kr> wrote:

>
>
> Thank you for answer.
>
>
>
> However, my Hadoop version is 2.4.1.
>
> Cluster does not have secondary namenode .
>
>
>
> How do I recover the namenode( hadoop version 2.4.1 ) by using the
> metadata(fsimage) ?
>
>
>
>
>
>
>
> -----Original Message-----
> *From:* "Raj K Singh"<ra...@gmail.com>
> *To:* <us...@hadoop.apache.org>; "cho ju il"<tj...@kgrid.co.kr>;
> *Cc:*
> *Sent:* 2014-07-08 (화) 02:05:15
> *Subject:* Re: How do I recover the namenode?
>
> please follow along the steps
>
>
> • Shutdown all Hadoop daemons on all servers in the cluster.
> • Copy NameNode metadata onto the secondary NameNode and copy the entire
> directory tree to the secondary NameNode.
> • Modify the core-site.xml file, making the secondary NameNode server the
> new NameNode server.
> • Replicate that file to all servers in the cluster.
> • Start the NameNode daemon on the secondary NameNode server.
> • Restart the secondary NameNode daemon on the new NameNode server.
> • Start the DataNode daemons on all DataNodes.
> • Start the JobTracker daemon on the JobTracker node.
> • Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
> • From any node in the cluster, use the “hadoop dfs –ls” command to verify
> that the data file created by TeraGen exists.
> • Check the total amount of HDFS storage used.
> • Run “hadoop fsck /” to compare to results recorded before the NameNode
> was halted.
>
> ::::::::::::::::::::::::::::::::::::::::
> Raj K Singh
> http://in.linkedin.com/in/rajkrrsingh
> http://www.rajkrrsingh.blogspot.com
> Mobile Tel: +91 (0)9899821370
>
>
> On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:
>
> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>

Re: How do I recover the namenode?

Posted by Stanley Shi <ss...@gopivotal.com>.
This is not recommended.
You only backup the fsimage file, the data blocks, which are stored in
datanode, are not stored.
The chances may be if you removed some file after your fsimage backup,
those data blocks belonging to this file will be removed from all
datanodes; in this case, your namenode will report that blocks are missing;



1. Since you're using HA, lots of the editlogs are stored in the journal
node; the fsimage you have may not be exactly the one you want;



Regards,
*Stanley Shi,*



On Tue, Jul 8, 2014 at 8:12 AM, cho ju il <tj...@kgrid.co.kr> wrote:

>
>
> Thank you for answer.
>
>
>
> However, my Hadoop version is 2.4.1.
>
> Cluster does not have secondary namenode .
>
>
>
> How do I recover the namenode( hadoop version 2.4.1 ) by using the
> metadata(fsimage) ?
>
>
>
>
>
>
>
> -----Original Message-----
> *From:* "Raj K Singh"<ra...@gmail.com>
> *To:* <us...@hadoop.apache.org>; "cho ju il"<tj...@kgrid.co.kr>;
> *Cc:*
> *Sent:* 2014-07-08 (화) 02:05:15
> *Subject:* Re: How do I recover the namenode?
>
> please follow along the steps
>
>
> • Shutdown all Hadoop daemons on all servers in the cluster.
> • Copy NameNode metadata onto the secondary NameNode and copy the entire
> directory tree to the secondary NameNode.
> • Modify the core-site.xml file, making the secondary NameNode server the
> new NameNode server.
> • Replicate that file to all servers in the cluster.
> • Start the NameNode daemon on the secondary NameNode server.
> • Restart the secondary NameNode daemon on the new NameNode server.
> • Start the DataNode daemons on all DataNodes.
> • Start the JobTracker daemon on the JobTracker node.
> • Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
> • From any node in the cluster, use the “hadoop dfs –ls” command to verify
> that the data file created by TeraGen exists.
> • Check the total amount of HDFS storage used.
> • Run “hadoop fsck /” to compare to results recorded before the NameNode
> was halted.
>
> ::::::::::::::::::::::::::::::::::::::::
> Raj K Singh
> http://in.linkedin.com/in/rajkrrsingh
> http://www.rajkrrsingh.blogspot.com
> Mobile Tel: +91 (0)9899821370
>
>
> On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:
>
> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>

Re: How do I recover the namenode?

Posted by Stanley Shi <ss...@gopivotal.com>.
This is not recommended.
You only backup the fsimage file, the data blocks, which are stored in
datanode, are not stored.
The chances may be if you removed some file after your fsimage backup,
those data blocks belonging to this file will be removed from all
datanodes; in this case, your namenode will report that blocks are missing;



1. Since you're using HA, lots of the editlogs are stored in the journal
node; the fsimage you have may not be exactly the one you want;



Regards,
*Stanley Shi,*



On Tue, Jul 8, 2014 at 8:12 AM, cho ju il <tj...@kgrid.co.kr> wrote:

>
>
> Thank you for answer.
>
>
>
> However, my Hadoop version is 2.4.1.
>
> Cluster does not have secondary namenode .
>
>
>
> How do I recover the namenode( hadoop version 2.4.1 ) by using the
> metadata(fsimage) ?
>
>
>
>
>
>
>
> -----Original Message-----
> *From:* "Raj K Singh"<ra...@gmail.com>
> *To:* <us...@hadoop.apache.org>; "cho ju il"<tj...@kgrid.co.kr>;
> *Cc:*
> *Sent:* 2014-07-08 (화) 02:05:15
> *Subject:* Re: How do I recover the namenode?
>
> please follow along the steps
>
>
> • Shutdown all Hadoop daemons on all servers in the cluster.
> • Copy NameNode metadata onto the secondary NameNode and copy the entire
> directory tree to the secondary NameNode.
> • Modify the core-site.xml file, making the secondary NameNode server the
> new NameNode server.
> • Replicate that file to all servers in the cluster.
> • Start the NameNode daemon on the secondary NameNode server.
> • Restart the secondary NameNode daemon on the new NameNode server.
> • Start the DataNode daemons on all DataNodes.
> • Start the JobTracker daemon on the JobTracker node.
> • Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
> • From any node in the cluster, use the “hadoop dfs –ls” command to verify
> that the data file created by TeraGen exists.
> • Check the total amount of HDFS storage used.
> • Run “hadoop fsck /” to compare to results recorded before the NameNode
> was halted.
>
> ::::::::::::::::::::::::::::::::::::::::
> Raj K Singh
> http://in.linkedin.com/in/rajkrrsingh
> http://www.rajkrrsingh.blogspot.com
> Mobile Tel: +91 (0)9899821370
>
>
> On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:
>
> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>

Re: How do I recover the namenode?

Posted by cho ju il <tj...@kgrid.co.kr>.
 
Thank you for answer.
 
However, my Hadoop version is 2.4.1. 
Cluster does not have secondary namenode .
 
How do I recover the namenode( hadoop version 2.4.1 ) by using the metadata(fsimage) ?
 
 
 
-----Original Message-----
From: "Raj K Singh"&lt;rajkrrsingh@gmail.com&gt; 
To: &lt;user@hadoop.apache.org&gt;; "cho ju il"&lt;tjstory@kgrid.co.kr&gt;; 
Cc: 
Sent: 2014-07-08 (화) 02:05:15
Subject: Re: How do I recover the namenode?
 
please follow along the steps  



•	Shutdown all Hadoop daemons on all servers in the cluster. 

•	Copy NameNode metadata onto the secondary NameNode and copy the entire directory tree to the secondary NameNode. 

•	Modify the core-site.xml file, making the secondary NameNode server the new NameNode server. 

•	Replicate that file to all servers in the cluster. 

•	Start the NameNode daemon on the secondary NameNode server. 

•	Restart the secondary NameNode daemon on the new NameNode server. 

•	Start the DataNode daemons on all DataNodes. 

•	Start the JobTracker daemon on the JobTracker node. 

•	Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes) 

•	From any node in the cluster, use the “hadoop dfs –ls” command to verify that the data file created by TeraGen exists. 

•	Check the total amount of HDFS storage used. 

•	Run “hadoop fsck /” to compare to results recorded before the NameNode was halted. 


::::::::::::::::::::::::::::::::::::::::
Raj K Singhhttp://in.linkedin.com/in/rajkrrsingh


http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370 



On Mon, Jul 7, 2014 at 1:30 PM, cho ju il &lt;tjstory@kgrid.co.kr&gt; wrote:


cluster is.. 
2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes


I regularly back up the metadata(fsimage) file. ( http://[namenode address]:50070/imagetransfer?getimage=1&amp;txid=latest )


How do I recover the namenode by using the metadata(fsimage)? 

 



Re: How do I recover the namenode?

Posted by cho ju il <tj...@kgrid.co.kr>.
 
Thank you for answer.
 
However, my Hadoop version is 2.4.1. 
Cluster does not have secondary namenode .
 
How do I recover the namenode( hadoop version 2.4.1 ) by using the metadata(fsimage) ?
 
 
 
-----Original Message-----
From: "Raj K Singh"&lt;rajkrrsingh@gmail.com&gt; 
To: &lt;user@hadoop.apache.org&gt;; "cho ju il"&lt;tjstory@kgrid.co.kr&gt;; 
Cc: 
Sent: 2014-07-08 (화) 02:05:15
Subject: Re: How do I recover the namenode?
 
please follow along the steps  



•	Shutdown all Hadoop daemons on all servers in the cluster. 

•	Copy NameNode metadata onto the secondary NameNode and copy the entire directory tree to the secondary NameNode. 

•	Modify the core-site.xml file, making the secondary NameNode server the new NameNode server. 

•	Replicate that file to all servers in the cluster. 

•	Start the NameNode daemon on the secondary NameNode server. 

•	Restart the secondary NameNode daemon on the new NameNode server. 

•	Start the DataNode daemons on all DataNodes. 

•	Start the JobTracker daemon on the JobTracker node. 

•	Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes) 

•	From any node in the cluster, use the “hadoop dfs –ls” command to verify that the data file created by TeraGen exists. 

•	Check the total amount of HDFS storage used. 

•	Run “hadoop fsck /” to compare to results recorded before the NameNode was halted. 


::::::::::::::::::::::::::::::::::::::::
Raj K Singhhttp://in.linkedin.com/in/rajkrrsingh


http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370 



On Mon, Jul 7, 2014 at 1:30 PM, cho ju il &lt;tjstory@kgrid.co.kr&gt; wrote:


cluster is.. 
2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes


I regularly back up the metadata(fsimage) file. ( http://[namenode address]:50070/imagetransfer?getimage=1&amp;txid=latest )


How do I recover the namenode by using the metadata(fsimage)? 

 



Re: How do I recover the namenode?

Posted by cho ju il <tj...@kgrid.co.kr>.
 
Thank you for answer.
 
However, my Hadoop version is 2.4.1. 
Cluster does not have secondary namenode .
 
How do I recover the namenode( hadoop version 2.4.1 ) by using the metadata(fsimage) ?
 
 
 
-----Original Message-----
From: "Raj K Singh"&lt;rajkrrsingh@gmail.com&gt; 
To: &lt;user@hadoop.apache.org&gt;; "cho ju il"&lt;tjstory@kgrid.co.kr&gt;; 
Cc: 
Sent: 2014-07-08 (화) 02:05:15
Subject: Re: How do I recover the namenode?
 
please follow along the steps  



•	Shutdown all Hadoop daemons on all servers in the cluster. 

•	Copy NameNode metadata onto the secondary NameNode and copy the entire directory tree to the secondary NameNode. 

•	Modify the core-site.xml file, making the secondary NameNode server the new NameNode server. 

•	Replicate that file to all servers in the cluster. 

•	Start the NameNode daemon on the secondary NameNode server. 

•	Restart the secondary NameNode daemon on the new NameNode server. 

•	Start the DataNode daemons on all DataNodes. 

•	Start the JobTracker daemon on the JobTracker node. 

•	Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes) 

•	From any node in the cluster, use the “hadoop dfs –ls” command to verify that the data file created by TeraGen exists. 

•	Check the total amount of HDFS storage used. 

•	Run “hadoop fsck /” to compare to results recorded before the NameNode was halted. 


::::::::::::::::::::::::::::::::::::::::
Raj K Singhhttp://in.linkedin.com/in/rajkrrsingh


http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370 



On Mon, Jul 7, 2014 at 1:30 PM, cho ju il &lt;tjstory@kgrid.co.kr&gt; wrote:


cluster is.. 
2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes


I regularly back up the metadata(fsimage) file. ( http://[namenode address]:50070/imagetransfer?getimage=1&amp;txid=latest )


How do I recover the namenode by using the metadata(fsimage)? 

 



Re: How do I recover the namenode?

Posted by cho ju il <tj...@kgrid.co.kr>.
 
Thank you for answer.
 
However, my Hadoop version is 2.4.1. 
Cluster does not have secondary namenode .
 
How do I recover the namenode( hadoop version 2.4.1 ) by using the metadata(fsimage) ?
 
 
 
-----Original Message-----
From: "Raj K Singh"&lt;rajkrrsingh@gmail.com&gt; 
To: &lt;user@hadoop.apache.org&gt;; "cho ju il"&lt;tjstory@kgrid.co.kr&gt;; 
Cc: 
Sent: 2014-07-08 (화) 02:05:15
Subject: Re: How do I recover the namenode?
 
please follow along the steps  



•	Shutdown all Hadoop daemons on all servers in the cluster. 

•	Copy NameNode metadata onto the secondary NameNode and copy the entire directory tree to the secondary NameNode. 

•	Modify the core-site.xml file, making the secondary NameNode server the new NameNode server. 

•	Replicate that file to all servers in the cluster. 

•	Start the NameNode daemon on the secondary NameNode server. 

•	Restart the secondary NameNode daemon on the new NameNode server. 

•	Start the DataNode daemons on all DataNodes. 

•	Start the JobTracker daemon on the JobTracker node. 

•	Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes) 

•	From any node in the cluster, use the “hadoop dfs –ls” command to verify that the data file created by TeraGen exists. 

•	Check the total amount of HDFS storage used. 

•	Run “hadoop fsck /” to compare to results recorded before the NameNode was halted. 


::::::::::::::::::::::::::::::::::::::::
Raj K Singhhttp://in.linkedin.com/in/rajkrrsingh


http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370 



On Mon, Jul 7, 2014 at 1:30 PM, cho ju il &lt;tjstory@kgrid.co.kr&gt; wrote:


cluster is.. 
2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes


I regularly back up the metadata(fsimage) file. ( http://[namenode address]:50070/imagetransfer?getimage=1&amp;txid=latest )


How do I recover the namenode by using the metadata(fsimage)? 

 



Re: How do I recover the namenode?

Posted by Raj K Singh <ra...@gmail.com>.
please follow along the steps


• Shutdown all Hadoop daemons on all servers in the cluster.
• Copy NameNode metadata onto the secondary NameNode and copy the entire
directory tree to the secondary NameNode.
• Modify the core-site.xml file, making the secondary NameNode server the
new NameNode server.
• Replicate that file to all servers in the cluster.
• Start the NameNode daemon on the secondary NameNode server.
• Restart the secondary NameNode daemon on the new NameNode server.
• Start the DataNode daemons on all DataNodes.
• Start the JobTracker daemon on the JobTracker node.
• Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
• From any node in the cluster, use the “hadoop dfs –ls” command to verify
that the data file created by TeraGen exists.
• Check the total amount of HDFS storage used.
• Run “hadoop fsck /” to compare to results recorded before the NameNode
was halted.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:

> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
>
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
>
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Re: How do I recover the namenode?

Posted by Raj K Singh <ra...@gmail.com>.
please follow along the steps


• Shutdown all Hadoop daemons on all servers in the cluster.
• Copy NameNode metadata onto the secondary NameNode and copy the entire
directory tree to the secondary NameNode.
• Modify the core-site.xml file, making the secondary NameNode server the
new NameNode server.
• Replicate that file to all servers in the cluster.
• Start the NameNode daemon on the secondary NameNode server.
• Restart the secondary NameNode daemon on the new NameNode server.
• Start the DataNode daemons on all DataNodes.
• Start the JobTracker daemon on the JobTracker node.
• Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
• From any node in the cluster, use the “hadoop dfs –ls” command to verify
that the data file created by TeraGen exists.
• Check the total amount of HDFS storage used.
• Run “hadoop fsck /” to compare to results recorded before the NameNode
was halted.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:

> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
>
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
>
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Re: How do I recover the namenode?

Posted by Raj K Singh <ra...@gmail.com>.
please follow along the steps


• Shutdown all Hadoop daemons on all servers in the cluster.
• Copy NameNode metadata onto the secondary NameNode and copy the entire
directory tree to the secondary NameNode.
• Modify the core-site.xml file, making the secondary NameNode server the
new NameNode server.
• Replicate that file to all servers in the cluster.
• Start the NameNode daemon on the secondary NameNode server.
• Restart the secondary NameNode daemon on the new NameNode server.
• Start the DataNode daemons on all DataNodes.
• Start the JobTracker daemon on the JobTracker node.
• Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
• From any node in the cluster, use the “hadoop dfs –ls” command to verify
that the data file created by TeraGen exists.
• Check the total amount of HDFS storage used.
• Run “hadoop fsck /” to compare to results recorded before the NameNode
was halted.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:

> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
>
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
>
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Re: How do I recover the namenode?

Posted by Raj K Singh <ra...@gmail.com>.
please follow along the steps


• Shutdown all Hadoop daemons on all servers in the cluster.
• Copy NameNode metadata onto the secondary NameNode and copy the entire
directory tree to the secondary NameNode.
• Modify the core-site.xml file, making the secondary NameNode server the
new NameNode server.
• Replicate that file to all servers in the cluster.
• Start the NameNode daemon on the secondary NameNode server.
• Restart the secondary NameNode daemon on the new NameNode server.
• Start the DataNode daemons on all DataNodes.
• Start the JobTracker daemon on the JobTracker node.
• Start the TaskTracker daemons on all the TaskTracker nodes (DataNodes)
• From any node in the cluster, use the “hadoop dfs –ls” command to verify
that the data file created by TeraGen exists.
• Check the total amount of HDFS storage used.
• Run “hadoop fsck /” to compare to results recorded before the NameNode
was halted.

::::::::::::::::::::::::::::::::::::::::
Raj K Singh
http://in.linkedin.com/in/rajkrrsingh
http://www.rajkrrsingh.blogspot.com
Mobile  Tel: +91 (0)9899821370


On Mon, Jul 7, 2014 at 1:30 PM, cho ju il <tj...@kgrid.co.kr> wrote:

> cluster is..
>
> 2 namenodes ( ha cluster ), 3 jounalnodes, n datanodes
>
>
>
> I regularly back up the metadata(fsimage) file. ( http://[namenode
> address]:50070/imagetransfer?getimage=1&txid=latest )
>
>
>
> How do I recover the namenode by using the metadata(fsimage)?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>