Reply
Highlighted
Explorer
Posts: 17
Registered: ‎06-26-2017
Accepted Solution

Why to stop Namenode services to taker Metadata backup ?

Hi Team,

Good Morning!

 

why to stop Namenode services to take backup of namenode metadata, instead of stoping namenode services we can put namenode in safe mode  "ON" mode right so that cluster will get read-only state and take the backup using #tar -cvf backname metadatapath

 

i am using Cloudera distribution 

in below url i found to stop servies and proceed to take the backup.. why not with safe mode option  ?? please help me

https://www.cloudera.com/documentation/enterprise/5-4-x/topics/cm_mc_hdfs_metadata_backup.html

 

Thanks

Balaji Vemula

Champion
Posts: 744
Registered: ‎05-16-2016

Re: Why to stop Namenode services to taker Metadata backup ?

You can perform the below without stopping the namenode .

 

hdfs dfsadmin -fetchImage 

Moreover its good to have HA configured to avoid single point of failure.

I will provide a good link that talks more about the metadata Backup ,its really good blog.

http://vijayjt.blogspot.in/2013/02/hdfs-file-system-metadata-backup.html

Posts: 512
Topics: 14
Kudos: 85
Solutions: 45
Registered: ‎09-02-2016

Re: Why to stop Namenode services to taker Metadata backup ?

[ Edited ]

@balajivsn

 

The link that you are referring is belongs to 5.4.x, please refer the below link (5.14.x) for little more details

 

There are two types of backup

1. HDFS Metadata backup

https://www.cloudera.com/documentation/enterprise/5-14-x/topics/cm_mc_hdfs_metadata_backup.html

 

Need to follow all the steps including "Stop the cluster. It is particularly important that the NameNode role process is not running so that you can make a consistent backup" 

 

2. NameNode Metadata backup

https://www.cloudera.com/documentation/enterprise/5-14-x/topics/cm_mc_nn_metadata_backup.html

 

can be done using 

$ hdfs dfsadmin -fetchImage backup_dir 

 

Now to answer your question,

If you see the first link, it says "Cloudera recommends backing up HDFS metadata before a major upgrade". So In the real-time production cluster, we perform the HDFS metadata backup, major upgrade during the downtime. So the given steps are recommended way for consistent backup.

 

But if your situation is just a mater of namenode back-up in a regular interval, then I belive you are correct.. you can switch-on the safe mode and take a backup and leave the safe mode. (or) you can try the option from the 2nd link

 

Note: Please make sure to test it in lower environments before apply in prod

Explorer
Posts: 17
Registered: ‎06-26-2017

Re: Why to stop Namenode services to taker Metadata backup ?

Thanks for your response

 

so Stop cluster means - it will stop all the components right(include bothe namenodes and other components like soop, hive, yarn etc....) ? if i am not wrong...

 

 

Posts: 512
Topics: 14
Kudos: 85
Solutions: 45
Registered: ‎09-02-2016

Re: Why to stop Namenode services to taker Metadata backup ?

@balajivsn

 

 

you can stop the cluster using CM -> Top left Cluster menu -> Stop


Yes, It will stop all the avilable services Ex: Hue, Hive, Spark, Flume, Yarn, HDFS, Zookeeper, etc. And it won't disturb your host & Cloudera Management Service.

 

Note: You don't need to separately handle daemons like namenode on this 

Explorer
Posts: 17
Registered: ‎06-26-2017

Re: Why to stop Namenode services to taker Metadata backup ?

Thanks for your support

Champion
Posts: 744
Registered: ‎05-16-2016

Re: Why to stop Namenode services to taker Metadata backup ?

yes this will stop all the service like hive impala spark kudu oozie solr etc 

sqoop however is a client tool.

Hope this is suffice . 

Explorer
Posts: 17
Registered: ‎06-26-2017

Re: Why to stop Namenode services to taker Metadata backup ?

Thank you for your support

Announcements