2008/06/08

Get Smart

smartmontools is a good thing -
  • smartctl -a /dev/sda (dump all the SMART info on the disk)
  • smartctl -t short /dev/sda (run a short self test)
  • smartctl -t long /dev/sda (run a long self test)
  • smartctl -l selftest /dev/sda (list the available self test results)
  • smartctl -s on /dev/sda (to turn on SMART if its not on by default)
Running one long test a week is the suggestion here:
0     8      *   *     0     smartctl -t long /dev/sda >>/var/log/smart.log 2>&1
0 9 * * 0 smartctl -l selftest /dev/sda >>/var/log/smart.log 2>&1
Setting:

SMARTD_OPTS="--interval=3600"

in /etc/conf.d/smartd is the only non default setting I made (for a laptop).

Funnies:
  • One disk didn't have SMART enabled (all the rest did...)
  • One (other) disk didn't list self tests in progress
  • RAID confuses SMART on two servers I tried it on (a test started on one side of a mirror showed up on both

No comments: