badblocks check

Install sysutils/smartmontools.

Check for any existing grown bad blocks:
# smartctl -a /dev/ada1 | less -Sip reallocated_sector
Scroll all the way to the right, if the last number on that line is higher than zero, consider the drive untrustworthy.

Try a short test next:
# smartctl -t short /dev/ada1

If that succeeds, try a long test:
# smartctl -t long /dev/ada1

Monitor the results with smartctl -a /dev/ada1 | less.
 
On modern hard drives, high-level bad block detection is not reliable. The drives have error correction at a lower level that will hide errors from programs like badblocks. smartctl(8) can be used to see the actual bad blocks after the long test will check the entire drive.
 
I'm using badblocks to do a really long test (with option -p). Letting it run for some days and compare the smartctl output between start and end. Reallocated sector count shouldn't increase, otherwise the drive is sent to RMA.
 
Back
Top