smartd is a utility to check on the Self-Monitoring, Analysis and Reporting Technology or S.M.A.R.T. of a physical storage device like a hard drive or solid state drive.

  1. Configure /usr/local/etc/smartd.conf

    DEFAULT -a -d scsi -m me@example.com -s S/../.././03
    /dev/da0
    /dev/da1
    /dev/da2
    /dev/da3
    /dev/da4
    /dev/da5
    DEFAULT -a -d scsi -m me@example.com -s S/../.././04
    /dev/da6
    /dev/da7
    /dev/da8
    /dev/da9
    DEFAULT -a -d scsi -m me@example.com -s S/../.././05
    /dev/da10
    /dev/da11
    /dev/da12
    /dev/da13
    DEFAULT -a -d scsi -m me@example.com -s S/../.././06
    /dev/da14
    /dev/da15
    /dev/da16
    /dev/da17
    DEFAULT -a -d scsi -m me@example.com -s S/../.././07
    /dev/da18
    /dev/da19
    /dev/da20
    /dev/da21
    

    The DEFAULT statements allow you to set default settings for the disks defined below. The porperties will remain the same until the next DEFAULT statement is defined.

    • The -a monitors all SMART properties.
    • -d identifies the device type (mine are all SATA).
    • -m denotes where you want failure emails sent.
    • -s sets a REGEX for how and when you want the test performed.
      • S is a short test. L is a long test.
      • The when statement is month/day-of-week/day/hour all represented in two-digit format.
  2. Enable the service to start and start it

    sysrc smartd_enable=YES -f /etc/rc.conf.local
    service smartd start
    

That's it! Oh, and try to be smarter than the guy at the top...