Why does not datanodes formatted during formatting the namenode server.
@Nilesh, Pls refer : https://issues.apache.org/jira/browse/HDFS-107
TLDR; the option to format datanode dirs was not added as it is risky and will cause data loss (if miss used).
Hope this helps.
Do accept this answer and close this thread if it helped in addressing your query.
Even we format namenode again we can loose the data. My question is why only namenode format why not datanodes.