badblocks -v /dev/sdN
, where N
is the device number - this checks for bad blocks. If found, use: badblocks /dev/sdN > /tmp/bad-block
then use: fsck -l bad-blocks /dev/sdN
to mark these blocks as bad.
dd if=/dev/zero of=/dev/sdN bs=1M &
, again where N
is the device number - CAUTION! THIS WILL ERASE ALL DATA ON THE DRIVE! -
smartctl -t long /dev/sdN
; long
can be replaced with offline, short, long, conveyance, force, vendor,N, select,M-N, pending,N, afterselect,[on|off]
; to get a usage summary, please use: smartctl -h
; to see the results of the test, please use: smartctl --all /dev/sdN