You need to solve the issue which caused your active name node to stop. Once that is done please run the command
hdfs namenode -bootstrapStandby
on the NameNode still down, then turn in on again. This node becomes Standby NameNode
Please follow the below steps:
Copy the HDFS Metadata from active name node to standby namenode.
Command:
hdfs namenode -bootstrapStandby
Copy the HDFS Metadata from Active name node to Standby Namenode. Once you run this command, you will get the information from which node and location the metadata is copying and whether it is copying successfully or not.
Information on Active namenode details.
Once Metadata is copied from Active namenode to standby namenode, you will get the message shown below in the screenshot.
Information regarding HDFS in Standby Namenode.
Start the namenode daemon in Standby namenode machine.
Command:
hadoop-daemon.sh start namenode
Now the name node which was down will become passive name node.