Skip to content

Instantly share code, notes, and snippets.

@pixelistik
Created November 15, 2011 10:41
Show Gist options
  • Save pixelistik/1366738 to your computer and use it in GitHub Desktop.
Save pixelistik/1366738 to your computer and use it in GitHub Desktop.
Diagnosis on an external USB drive
# sudo, on all of these, please
# Unmounted drive is assumed
# Show attached drives to make shure we are talking to the right one
fdisk -l
# Try to write and read (http://forums.whirlpool.net.au/archive/790647)
dd if=/dev/urandom of=/dev/sdb
md5sum /dev/sdb
md5sum /dev/sdb # Twice -> do the results match?
# Show SMART status
# "value" is normalized to 100=good and should not fall below "threshold"
smartctl -a -d sat /dev/sdb
# Run offline self test (takes hours)
smartctl -t offline -d sat /dev/sdb
# Try to prevent unwanted standby
hdparm -S 0 -K /dev/sdb # S=0 is "no standby", K is "keep setting on restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment