Query S.M.A.R.T. information from all hard-disks :
# for dev in /dev/sd? ; do echo -e "\n\n### DEV: $dev ###\n\n" ; smartctl -a $dev || break ; read -p "-- ^ $dev -- Continue ? --" ; done
smartctl -t short /dev/sdXto initiate a short self-test (
longfor extented self-tests).
smartd may be configured (
/etc/smartd.conf) to schedule automatic run of self-tests,
albeit resorting to some arcane configuration, here
where (I guess) ‘S’ stands for Short, and ‘L’ for Long :
# /etc/smartd.conf # Short self-test everyday between 12:00 - 13:00 ; # and extended self-test on Saturdays btw. 19:00 20:00 : DEVICESCAN -a -o on -S on -n standby,q \ -W 4,35,40 \ -s (S/../.././12|L/../../6/19) \ -m firstname.lastname@example.org
DEVICESCAN ...encountered will stop smartd from reading the rest of its configuration file.
/dev/sda -a -W 2,35,40.
And that disks may be specified by their UUID instead of their block device
/dev/sdX so that configuration is not affected by e.g. some internal
re-wiring of the drives on the motherboard/controller(s),
ls -l /dev/disk/by-uuid/ :
/dev/disk/by-uuid/09022016-0924-1909-2411-2709cade0da3 -a -o on -S on