hard drive sector testing on Ubuntu
Rashkae
ubuntu at tigershaunt.com
Sat Sep 29 16:18:28 UTC 2012
On 09/29/2012 02:09 AM, Nils Kassube wrote:
>
> AFAIK badblocks wouldn't restore the data.
>
Badblocks non-destructive read-write (-n) test will, indeed, restore the
data. Of course, it would still be a good idea to have a good backup
first, and use a UPS.
Also note that by default, badblocks repeats the test with 4 different
patterns. On a modern >1TB drive, that ... can take a while, so I would
usually use -t 0xaa (or -t random) to only do 1 pass.
Do not even thing of doing this on an SDD. Probably not a good idea on
those hybrid drives either. Reasons are outside the scope of this quick
e-mail, just don't do it.
And finally, this whole methology has been deprecated for almost a
decade. Sector testing should be handled transparently by the drive
firware. Use smartctl to examine the results (or initiate a full test.)
At most, you should only ever have to do a read test to force the
drive to scan the entire thing end to end. (something like ddrescue
/dev/sd? /dev/null -f will work nicely.)
More information about the ubuntu-users
mailing list