Namenode information - missing blocks


#1

Hi,

I have browsed Namenode UI first time in lab and I see below error message in my screen -

please let me know why is it on my screen even if i have opened the namenode info first time.


#2

This is because the list of the blocks listed there may have been corrupted/missing. HDFS will try to reconstruct them from the healthy block in some time. Else, IF THEY ARE NOT IMPORTANT and YOU HAVE A COPY of the data, then you can go ahead and delete the file from HDFS, and again upload/copy to HDFS in that way this error may be cleared.

Some important commands.

Find missing blocks status - Please go through output after running below command.
hdfs fsck /

Finding corrput blocks
hdfs fsck / | egrep -v '^\.+$' | grep -v replica | grep -v Replica

Removing corrupt files
hdfs dfs -rm -skipTrash /path/tofile/name

You can run the below command and track the node where the block is corrpupted and check the logs and troubleshoot the issue.
hdfs fsck /path/tofile/name -locations -blocks -files