What is a Secondary NameNode and why is it required?

A Secondary NameNode is created such that it acts as a NameNode in case the actual NameNode fails. The Secondary NameNode maintains a copy of the namespace image by periodically merging it with the edit log.

When the primary node fails and the data files are lost, you copy the NameNode metadata files to the secondary NameNode and run it as the new primary NameNode.