fsck

 

 


Phases of fsck

 

Phase 1: Check Blocks and Sizes - checks inodes for inconsistencies

Phase 2: Check Path-Names - checks directory <-> inode consistencies

Phase 3: Check Connectivity - checks that all directories are connected to the file system

Phase 4: Check Reference Counts - compares link count information from Phases 2 & 3, correcting discrepancies

Phase 5: Check Cylinder Groups - checks free blocks and the used inode maps for consistency

Phase 6: Salvage Cylinder Groups - update the tables to reflect any changes made in earlier passes

 


Options

 

-z undo_file

Before overwriting a file system block, write the old  contents  of  the block to an undo file.

This undo file can be used with e2undo(8) to restore the old contents of the file system should something go wrong.

i.e.

/sbin/fsck.ext4 -z undo_file -b 98304 -B 4096 /dev/myraidvg/MyBackup_snap -y

Overwriting existing filesystem; this can be undone using the command:

e2undo undo_file /dev/myraidvg/MyBackup_snap

-p

Automatically  repair ("preen") the file system

automatically fix any filesystem problems that can  be  safely fixed  without  human intervention.

If e2fsck discovers a problem which may require the system administrator to take additional  corrective  action, 

e2fsck will print a description of the problem and then exit with the value 4 logically or'ed into the exit code.