Previously, I wrote to use badblocks to check bad channels.
Since badblocks only checks for 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 checking, the number of-l records that can be used by 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, you can
You can also check the bad track before creating a file system.
Badblocks can be executed along with e2fsck and mke2fs-C deletion (the same is true for ext3 file systems). Before creating a file system, check the export 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 "read-only" to check the hard disk. This command will check the hard disk when formatting the hard disk and mark the wrong hard disk "Block ". This method requires a lot of patience to format the hard disk. After executing the command, the hard disk will be checked one by one in Read mode.
Disk Bad Track handling