Monitoring drive health using S.M.A.R.T


S.M.A.R.T – Self-Monitoring, Analysis and Reporting Technology┬ácan be used to monitor and report on the health of storage devices attached to JBOD drive controller. Each storage device maintains SMART counters that can provide detailed information on the status of each storage device. To monitor the health of storage devices attached to RAID controllers requires the use of WebCLI, StorCLI or MegaCLI (See monitoring storage devices attached to RAID controllers).

Installation
# yum install smartmontools

Start service
# chkconfig smartmontools on
# service smartd start

List drive devices in server
# fdisk -l

Enable SMART monitoring for /dev/sda (if off)
# smartctl -s on /dev/sda

The smartctl program allows SMART drive data to be viewed allowing the health to be validated:

# smartctl -H /dev/sda    
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/    
=== START OF READ SMART DATA SECTION ===    
SMART overall-health self-assessment test result: PASSED

Detailed drive information can be gathered such as the type of drive, serial number, etc… using the -i option. The -a option provides┬ádrive temperature, hours powered on, and tests conducted with results.

# smartctl -i /dev/sda    
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen    
Home page is http://smartmontools.sourceforge.net/    
=== START OF INFORMATION SECTION ===    
Model Family:     Seagate Barracuda 7200.10 family    
Device Model:     ST3320620AS    
Serial Number:    9QF26NGD    
Firmware Version: 3.AAJ    
User Capacity:    320,072,933,376 bytes
Device is:        In smartctl database [for details use: -P show]   
ATA Version is:   7    
ATA Standard is:  Exact ATA specification draft version not indicated    
Local Time is:    Sun Mar  7 14:20:18 2010 MST    
SMART support is: Available - device has SMART capability.    
SMART support is: Enabled

Review SMART counters for /dev/sda
# smartctl -A /dev/sda

Configuring email alerts

By default, email alerts are sent to ‘root’ on the server.
To direct alerts to another email address, edit /etc/smartd.conf and comment the line –
DEVICESCAN -H -m root

Add lines in /etc/smartd.conf for each drive to be monitored, example –
/dev/sda -a -s (S/../../(1|3|6)/01|L) -m tates@us.ibm.com -M diminishing

Detailed documentation on line syntax can be found in /usr/share/doc/smartmontools*

Restarting SMART service
# service smartd restart

Testing email alerts
In order to test email alerts, edit /etc/smartd.conf and replace “diminishing” with “test”.
Save /etc/smartd.conf and restart SMART service.

If you do not receive an email, check the settings of the mail server (usually sendmail).