Previously, I wrote to use badblocks to check bad channels.
Because badblocks only detects Bad Sectors, and then marks the bad track information in the log file, it does not process the bad sectors. If you want to skip these bad blocks during disk detection, you can use the-l parameter of fsck.
Badblocks-B 4096-C 16/dev/sda1-O SDA-badblocks-list use this pair to check the failure and save it in SDA-badblocks-list.
Fsck. ext4-L/tmp/sd-badblock-list.final/dev/sda1 on the disk, where fsck. ext4 is based on your file system.
Finally, we can.
You can also detect bad channels before creating a file system.
Badblocks can be run with e2fsck and mke2fs-C deletion (the same for ext3 file systems). Before creating a file system, check the bad track information:
# Mkfs. ext3-C/dev/sda1
The code indicates to use-C to check the bad path hard disk before creating the file system.
This operation clearly tells us that we can use the "mkfs. ext3-c" option to check the hard disk in the "read-only" mode. This command will check the hard disk when formatting the hard disk and mark the wrong hard disk "Block ". It takes a lot of patience to format the hard disk using this method, because after the command is run, the hard disk will be checked one by one in Read mode.
Disk Bad Track handling