2017/04/18

HDFS Corrupted File System

If the HDFS File System is corrupted, follow these steps to identify the files that are corrupted and to manually delete the corrupted files.

First check is the status of the file system.

The output of the "fsck" command will list lots of information and is difficult to read it on the screen, so redirect the output to a file.  Going through the fsck output  reveals that my file system is CORRUPT.

Add caption
The output of "fsck" has several messages related to certain file blocks being corrupted as shown below:


In order to fix this issue, I manually deleted the corrupted files using the below command:
After all the corrupted files are deleted, by running the "fsck" reveals that the HDFS is healthy.






No comments:

Post a Comment

File Handling with Python

This little utility is for copying files from source to target directories.  On the way it checks whether a directory exists in the target, ...