What is fsck ?

  • Fsck stands for File System Check. This command is used by HDFS and also used to check inconsistencies and if there is any problem in the file.
  • For example, if there are any missing blocks for a file, HDFS gets notified through this command.
  • There are two modes used in fsck command interactive and non-interactive.
    • Interactive mode prompts the user each time it finds an error to determine whether or not the user wants to fix the error or continue without fixing.
    • Non-interactive mode automatically corrects errors without prompting the user.
What is fsck

Command list

  • There are different arguments that can be passed with this command to emit different results.
COMMAND_OPTION Description
path Start checking from this path.
move Move corrupted files to /lost+found
delete Delete corrupted files.
openforwrite Print out files opened for write.
files Print out files being checked.
blocks Print out block report.
locations Print out locations for every block.
racks Print out network topology for data-node locations.

Categorized in:

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,