This page looks best with JavaScript enabled

Setting up SMART Daemon on Debian

 ·  ☕ 2 min read

Background

SMART (Self-Monitoring, Analysis and Reporting Technology) is a set of diagnostic tools built-in to most modern hard drives and disks that allow monitoring of disk status. smartd is a daemon that handles running the SMART tools (smartmontools) periodically and reporting on the results.

Details

The following guide lists the steps I use to setup smartd:

  • Install smartmontools: apt-get install smartmontools
  • Setup smartmontools
    • edit /etc/default/smartmontools to enable smartd and the smartd run interval (uncomment the following):
  #start_smartd = yes
  start_smartd = yes
  #smartd_opts="--interval=1800"
  smartd_opts="--interval=7200" #note: I set this to every 2hrs vs 30m for non-server based setups.
  • edit /etc/smartd.conf as needed:
    • I add the “-M test” to the end of the first DEVICESCAN declaration to receive a “Test” email stating that smartd is running
  • Start smartmontools: service smartmontools start

Notes

From time to time I run into a disks that does not have SMART capabilities. When this occurs, you are often left with finding/using the disk manufacturers diagnostic tools or a general disk checking/fixing tools such as badblocks. badblocks can also be useful on disks that have SMART in the event that SMART finds an error. badblocks simply checks a disk for bad blocks, it is often used in conjunction with fsck to fix and/or mark bad blocks as bad so the filesystem does not attempt to use these blocks.

Share on

drad
WRITTEN BY
drad
Sr. Consultant