1

My hdfs data got corrupted.

on doing fsck, i got the following result . /siva: CORRUPT block blk_-1910702044505537827

/siva: CORRUPT block blk_6483992593913191763

/siva: MISSING 2 blocks of total size 82009995 B.Status: CORRUPT Total size: 82009995 B Total dirs: 8 Total files: 1 Total blocks (validated): 2 (avg. block size 41004997 B)


CORRUPT FILES: 1 MISSING BLOCKS: 2 MISSING SIZE: 82009995 B CORRUPT BLOCKS: 2


Minimally replicated blocks: 0 (0.0 %) Over-replicated blocks: 0 (0.0 %) Under-replicated blocks: 0 (0.0 %) Mis-replicated blocks: 0 (0.0 %) Default replication factor: 2 Average block replication: 0.0 Corrupt blocks: 2 Missing replicas: 0 Number of data-nodes: 1 Number of racks: 1 FSCK ended at Tue Feb 23 12:21:03 IST 2016 in 2 milliseconds

The filesystem under path '/' is CORRUPT

Then i tried to remove the /siva folder but i got the following output rmr: cannot remove /siva: No such file or directory.

please support

2 Answers2

0

Use hdfs fsck / -delete to remove corrupted files.

facha
  • 11,862
  • 14
  • 59
  • 82
  • hadoop fsck /siva -delete FSCK started by hadoop from /xxx.xxx.xxx.xx for path /siva at Tue Feb 23 18:03:01 IST 2016 Path '/siva' does not exist – Mebin Philip Mathew Feb 23 '16 at 12:34
0
  1. Please run the below command on any headnode[ HN0 or HN1]. hdfs fsck -D "fs.default.name=hdfs://mycluster/" /

  2. In the report, we can see a filesystem as corrupt since blocks are got corrupted. The filesystem under path '/' is CORRUPT

  3. Run the below command to fix this issue.

  4. hdfs fsck -D "fs.default.name=hdfs://mycluster/" / -delete

  5. after, run the below command again to see a filesystem status.

  6. hdfs fsck -D "fs.default.name=hdfs://mycluster/" /

  7. this time we should see the filesytem status as Healthy like below. The filesystem under path '/' is HEALTHY

Umer
  • 25
  • 5