Linux under Disk Check Repair command e2fsck
-A: Check the partition, and automatically fix the problem if it is found.
-B: Sets the superblock position.
-B Size: Specifies size as a chunk.
C: Check if the partition has a bad track.
-C File: Stores the results of the check in file.
-D: Output e2fsck debug results.
-f:e2fsck presets will only check for the wrong file system, plus-f is a mandatory check.
-F: Erase the drive's buffer cache before checking to avoid errors.
-l list: The bad rail block is logged into the list.
-D: Prints the debug results of the e2fsck.
-F: Mandatory check.
-N: Open the file system (READ-ONLY)
-P: Turn off interactive mode, if there is a problem with automatic repair, equivalent to-a.
-V: Displays a detailed report.
-Y: Enable user interaction mode.
Examples of Use
Check the/dev/mapper/volgroup00-logvol02 for problems and fix them automatically if they are found:
E2fsck-a/dev/mapper/volgroup00-logvol02
Please umount partition before executing e2fsck or fsck, otherwise the file system will be destroyed.
If the partition is busy, all processes involved in the partition need to be killed, and a quick way is to execute fuser-k/home.
If the root directory (/) needs to be checked and repaired, it needs to go into Singal user mode.
Finally, don't forget to put the partition on Mount.
On Linux disk repair e2fsck command