SmartmonTools & GSmartControl

Smartmontools is a command-line Hard Drive Diagnostic Tool that gives you clues on how long your disk has to live. You can run it manually, or you can configure it to periodically test your drives in the background and notify you about test failures via email.

GSmartControl is a GUI for Smartmontools and much easier to use.

Check out this Ubuntu SmartmonTools Tutorial on how to install and set them up.

Here are some tips that are not easily gleaned from the previous websites:

How to Schedule Regular SmartmonTools Tests in the Background

For the most part, you can follow this Ubuntu SmartmonTools Tutorial

On Fedora, you might find the configuration file at /etc/smartd.notify instead.  Remember to restart the smartd service

sudo service smartd restart

We used this configuration to schedule short (<15 min) self-tests on the SATA drive /dev/sda every day at 2 am. An email will be sent to the root user in case of failure.

/dev/sda -a -d ata -s (S/../.././02) -m root -M exec /usr/libexec/smartmontools/smartdnotify

Make sure that your root user has an email setup. You can forward your root user email to other email addresses by editing the /root/.forward file. Add comma-separated email addresses on the first line.

How to Run GSmartControl Remotely

  • ssh with X11 forwarding enabled so that you can run the GUI applications remotely
$ ssh -X myMachineName
  • Switch to a user with root access. You can not simply use sudo.
su myRootLevelUser
  • Launch gsmartcontrol

You will see a graphical user interface pop up on your own machine that looks like this:GSmartControlWindow

To View Disk Details, Errors, Test Results

In GSmartControl, Right click on a disk icon > View Details. The following dialog will popup.


Navigate between tabs to view different information about the disk.

Interpreting SmartmonTool Output

This is not easy. SmartmonTools gives you information about certain error counts and temperatures, etc., but it is up to you to decide if the errors are acceptable. Also, SmartmonTools is not infallible.  A disk can fail even though it passes SmartmonTools health tests, and a disk can survive for a long time even after failing SmartmonTools health tests.

GSmartControl will give you tooltips on how to interpret information when you hover over items in the Attributes tab. Worrisome errors are highlighted. But it’s best to google the details to be sure. Check out this SmartmonTools tutorial

Rebuilding RAIDs while running SMART tests

Don’t do it.  Supposedly SMART tests do not affect the data.  However, we’ve had consistent ZFS zpool rebuilding failures when SMART (Smartmon tools) tests were run during rebuilding (aka resilvering).  Best to disable any automatic SMART tests when you are rebuilding your RAID arrays or ZFS zpools.