Difference between revisions of "S.M.A.R.T."

From ArchWiki
Jump to: navigation, search
(Step 3: Check your disk(s))
m (SMART HOWTO: embedded link to Wikipedia article)
Line 1: Line 1:
[[Category:HOWTOs (English)]]
[[Category:HOWTOs (English)]]
This page will describe how to setup SMART to monitor your harddisks.
This page will describe how to setup [http://en.wikipedia.org/wiki/S.M.A.R.T. S.M.A.R.T.] to monitor your harddisks.
===Step 1: Install smartmontools===
===Step 1: Install smartmontools===

Revision as of 19:12, 21 October 2009


This page will describe how to setup S.M.A.R.T. to monitor your harddisks.

Step 1: Install smartmontools

# pacman -Sy smartmontools

If you'd prefer a GUI to smartmontools, install gsmartcontrol

# pacman -Sy gsmartcontrol

Step 2: Check if your disk(s) support SMART


smartctl -i /dev/hda


smartctl -i -d ata /dev/sda

Look for:

  • "SMART support is: Available - device has SMART capability."
  • "SMART support is: Enabled"

If SMART is NOT enabled you have to do this:

  • IDE-disks:
smartctl -s on /dev/hda
  • SATA-discs:
smartctl -s on -d ata /dev/sda

Step 3: Check your disk(s)

Check the SMART health status of a device

smartctl -H /dev/sda

If all goes well, it will return PASSED.

If the device reports failing health status, this means either that the device has already failed, or that it is predicting its own failure within the next 24 hours. If this happens, use the "-a" option to get more information, and get your data off the disk and someplace safe as soon as you can.

Check the SMART Error Log

smartctl -l error /dev/sda

If we read "No Errors Logged", it's ok. If there are a few errors (and they are not so recent) you don't have to worry too much. If there are a lot of errors it's better if you backup your data as soon as you can.

Note: This is not all tests but only two of them. See the manual for more.

Step 4: Make smartd automatically monitor your drives

smartd can be configured at start-up using the configuration file /etc/smartd.conf. If no configuration exists smartd monitors for all possible SMART errors (corresponding to the "-a" Directive in the configuration file).

If the first non-comment entry in the configuration file is the text string DEVICESCAN in capital letters, then smartd will ignore any remaining lines in the configuration file, and will scan for devices. For an ATA device, if no Directives appear, then the device will be monitored as if the "-a" Directive (monitor all SMART properties) had been given.

To make configuration for individual devices you have to comment the line with DEVICESCAN and add a configuration line for every device. Here is an example (more are given inside /etc/smart.conf):


/dev/hda -a -m root@localhost

This will monitor all attributes and send a warning email to root@localhost if a failure or a new error occurs.

Note: To be able to send internal mail, you need a MTA like sendmail or postfix

Now start the daemon:

# /etc/rc.d/smartd start

If everything is working as it should, you can add smartd to your DAEMONS array in /etc/rc.conf