Today, my new hard drive is here. I don't know how to use it for the time being. It can be loaded into the CD-ROM drive rack for G430, or it can be used as a removable hard drive.
Recall the previous record of a badblocks usage, used to check the bad road, here and then put the spare.
##################################################################
Badblocks is a common bad-word repair tool used under Linux. You can use Badblocks to check if you think there may be a bad path on your hard drive, or if the smart data shows a bad path.
Suppose we want to check the hard drive is/dev/sdb
$sudo badblocks -s -v -o sdbbadblocks.log /dev/sdb
This allows a read-only scan of the hard drive, automatically acquires the number of hard disk blocks and scans all blocks, outputting the scan log to the screen and recording it in the Sdbbadblocks.log file.
Because the scanning speed is relatively low, not necessarily can sweep, can be divided into several times.
sudo badblocks -s -v -o sdbbadblocks.log /dev/sdb END START
Replace end and start with the number of the end and start blocks.
If a bad path is found, a write scan can be performed to fix it. The write scan will automatically remap when it encounters a bad path. The write scan overwrites the original data, so please back it up first. The Write scan speed is very low, so you should only scan for read-only scans to find the wrong part.
$sudo badblocks -w -s /dev/sdb END START
If you want to know the meaning of each option and more usage, please man badblocks.
Use the Badblocks command to detect and repair hard drive bad lanes