Back up the following critical data before attempting an upgrade. On the node that hosts the NameNode, open the Hadoop Command line shortcut that opens a command window in the Hadoop directory. Run the following commands:
Open the command prompt using the Hadoop user account and go to the Hadoop home directory:
runas /user:hadoop "cmd /K cd %HADOOP_HOME%"
Run the
fsckcommand to fix any file system errors.hadoop fsck / -files -blocks -locations > dfs-old-fsck-1.log
The console output is printed to the
dfs-old-fsck-1.logfile.Capture the complete namespace directory tree of the file system:
hadoop fs -lsr / > dfs-old-lsr-1.log
Create a list of DataNodes in the cluster:
hadoop dfsadmin -report > dfs-old-report-1.log
Capture output from fsck command:
hadoop fsck / -block -locations -files > fsck-old-report-1.log
![]() | Note |
|---|---|
Verify there are no missing or corrupted files/replicas in the |

![[Note]](../common/images/admon/note.png)
