2

Ambari is generating an alert NameNode Blocks Health: Total Blocks:[38252543], Missing Blocks:[2]. No further information.

I've run hdfs fsck / which is reporting the entire filesystem as healthy. I've run hdfs dfsadmin -report which reports that there are two missing blocks, but does not give details.

How do I find these missing blocks and thence fix them?

2 Answers 2

0

I've observed a similar kind of reporting my setup today (CentOS 7.3, HDP 2.5.3, Ambari 2.4.2).

The files with missing blocks I were able to find via:

hdfs fsck / | grep -i 'miss' 
hdfs fsck / | grep 'miss' | cut -d ":" -f 1
hdfs fsck / | grep 'Under replicated' | cut -d ":" -f 1

and fixing them with:

hdfs dfs -setrep 3 <fileName>
1
  • 1
    thank you. It's been a while but I believe I ended up running the same command to fix it. Jan 16, 2018 at 20:43
0

you can find no.of corrupted and missing blocks with below command

hdfs fsck -list-corruptfileblocks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .