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?

Michael Martinez
  • 2,645
  • 3
  • 24
  • 35

2 Answers2

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>
U880D
  • 1,017
  • 2
  • 12
  • 18
0

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

hdfs fsck -list-corruptfileblocks
Thomas
  • 4,225
  • 5
  • 23
  • 28