dd is a swiss army knife command line tool that you can use to move data from anywhere to anywhere. If you run the long smart test the results should give you the exact sector that has the problem. You can try to have dd read that sector with:
Assuming the drive in question is sda of course, and sector is the number of the bad sector. This should fail with an IO error. If it does, then you know you have the right place. To write that sector full of zeroes, you do:Code:sudo dd if=/dev/sda of=/dev/null bs=512 count=1 skip=sector
Make sure you type it exactly. Getting it wrong can have very bad results. Notice the skip becomes seek in the second version. Do not forget the count=1 option or it will keep keep going until the end of the disk.Code:sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=sector
If it is successful you should be able to read the sector again and have it not fail this time. You should then see the smart numbers change. The pending sector count should go down by one, and depending on whether the drive had to remap because the sector was physically bad or not, the reallocated sector count should go up by one.



Adv Reply


Bookmarks