When setting up an installation and if not everything goes well, we might face the situation of datanode/namenode desyncrhonization. You should immediately refer to the logs. There you can see the following message:
... ERROR org.apache.hadoop.dfs.DataNode: java.io.IOException: Incompatible namespaceIDs in /app/hadoop/tmp/dfs/data: namenode namespaceID = 308967713; datanode namespaceID = 113030094 at org.apache.hadoop.dfs.DataStorage.doTransition(DataStorage.java:281) at org.apache.hadoop.dfs.DataStorage.recoverTransitionRead(DataStorage.java:121)
- Go to you namenode's directory (dfs.name.dir) and get the namespaceID value from current/VERSION.
- Go to your data node's storage directory (dfs.data.dir) and edit current/VERSION.
- Change the value to the datanode's value for the namenode's value.
I had not been able to repair the filesystem with any other way.