Let me explain you step by step.
Each DataNode keeps a small amount of metadata allowing it to identify the cluster it participates in.
If this metadata is lost, then the DataNode cannot participate in an HDFS instance and the data blocks it stores cannot be reached.
When an HDFS instance is formatted, the NameNode generates a unique namespace id for the instance.
When DataNodes first connect to the NameNode, they bind to this namespace id and establish a unique “storage id” that identifies that particular DataNode in the HDFS instance. This data as well as information about what version of Hadoop was used to create the block files, is stored in a filed named VERSION in the ${dfs.data.dir}/active directory.
Hope it will answer to your query to some extent.