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 -s S/../.././03
    DEFAULT -a -d scsi -m -s S/../.././04
    DEFAULT -a -d scsi -m -s S/../.././05
    DEFAULT -a -d scsi -m -s S/../.././06
    DEFAULT -a -d scsi -m -s S/../.././07

    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!