S.M.A.R.T.: Difference between revisions

From David's Wiki
Line 21: Line 21:
# Install the following:
# Install the following:
#:<pre>
#:<pre>
#::sudo apt install mailutils msmtp msmtp-mta smartmontools
#::sudo apt install mailutils msmtp msmtp-mta smartmontools</pre>  
#::</pre>  
# Edit <code>/etc/smartd.conf</code>
# Edit <code>/etc/smartd.conf</code>
# Add some options
# Add some options

Revision as of 19:31, 7 February 2021

SMART Testing

smartctl

USB Hard Drives

  • Add -d sat

For some seagate hard drives, it will run in uas mode and smart won't work.
See https://www.smartmontools.org/wiki/SAT-with-UAS-Linux.
To fix this, you can find your id by looking in /var/log/kern.log and filling in:

GRUB_CMDLINE_LINUX="usb_storage.quirks=0bc2:[id]:u"
  • Multiple hard drives should be comma separated:
    • E.g. 0bc2:abcd:u,0bc2:efgh:u
  • 0bc2 is the manufacturer id for Seagate drives.

Remote monitoring

See Reference

  1. Install the following:
    sudo apt install mailutils msmtp msmtp-mta smartmontools
  2. Edit /etc/smartd.conf
  3. Add some options

See smartd.conf reference

Example:

/dev/disk/by-id/usb-WD_easystore_264D_394B47573334314C-0:0 -s (S/../../6/01) -a -m [email protected] -M test -M daily
  • -a turns on some defaults for checking smart attributes
  • -M Test sends a test email when smartd starts
  • -M daily sends daily reminders for failures
  • -s (S/../../6/01) runs a short test every saturday at 1AM.

gsmartcontrol

gsmartcontrol is a GUI frontend for smartctl