Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

smartmontools



Tom Metro wrote:
> Matthew Gillen wrote:
>>> So it looks like the drives in the RAID array weren't being monitored by
>>> smartd. ... Seems it doesn't like these SATA drives.
>>
>> The older libata doesn't provide most of the ioctls needed for 
>> smart/hdparm on SATA drives...
> 
> As noted, this system is running the "bleeding edge" Ubuntu Fiesty (akin 
> to Debian Unstable), so it ought to be the latest. I'll investigate 
> tomorrow and post a follow-up.

Here's what I found. The smartmontools page explains:
http://smartmontools.sourceforge.net/#testinghelp

   Smartmontools should work correctly with SATA drives under both
   Linux 2.4 and 2.6 kernels, if you use the standard IDE drivers in
   drivers/ide. If you use the new libata drivers, it won't work
   correctly because libata doesn't yet support the needed
   ATA-passthrough ioctl() calls. Jeff Garzik, the libata developer,
   says that this support will be added to libata in the future. When
   this happens, we'll add support to smartmontools for a new
   SATA/libata device type '-d sata'.
   ...
   Note: an unofficial patch to libata that allows smartmontools to be
   used with the standard '-d ata' device type was posted to the linux
   kernel mailing list at the end of August 2004. The patch is included
   in the libata-dev patchset that can be applied to a recent Linux
   kernel (>= 2.6.9).
   ...

Seems like this info is a bit dated...I see in smartd.conf:

# Linux-specific example: monitor a SATA (Serial ATA) disk which uses
# the libata driver.  This requires a Linux 2.6.15 or later kernel.
# Note that the disk is addressed via a SCSI device, but the
# underlying disk type is actually ATA
# /dev/sda -a -d ata

This method worked with the stock driver supplied with Ubuntu.

So it seems like the idea of using '-d sata' has been dropped, and 
smartmontools is sticking with the '-d ata' approach. It also seems like 
the patch has been integrated into libata.


I ran into a few issues with this change. The first is that I had been 
using the DEVICESCAN directive in smartd.conf, which causes smartd to 
scan for all disk devices. In order to specify the device type, I needed 
to disable it and list the devices explicitly. That's no problem, except 
that also meant that all the -m and -M directives (for who to email and 
what actions to take on errors), which used to be listed just once after 
DEVICESCAN, had to be repeated for every drive. I couldn't find a way to 
specify common or default directives that should apply to all drives.

The oddity I noticed was when I used the directives '-o on' (offline 
data collection) and '-S on' (autosave attributes) (which seemed to be 
recommended), I got:
smartd: Device: /dev/sda, could not enable SMART Attribute Autosave.
smartd: Device: /dev/sda, enable SMART Automatic Offline Testing failed.

even though smartctl -a seems to suggest that these are supported:

# smartctl -a -d ata /dev/sda
smartctl version 5.36 ...
Device Model:     ST3320620AS
...
Device is:        Not in smartctl database
...
Offline data collection status:  (0x82) Offline data collection activity
                                         was completed without error.
                                         Auto Offline Data Collection: 
Enabled.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                         Auto Offline data collection 
on/off support.
                                         Suspend Offline collection upon new
                                         command.
                                         Offline surface scan supported.
                                         Self-test supported.
                                         No Conveyance Self-test supported.
                                         Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                         power-saving mode.
                                         Supports SMART auto save timer.
...


The version of smartmontools supplied with Ubuntu is one rev behind the 
latest, so I downloaded and built the latest in a temporary directory 
for testing. Even with the latest version I get:

# /tmp/sm/sbin/smartctl -o on -d ata /dev/sda
smartctl version 5.37 ...

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
Error SMART Enable Automatic Offline failed: Input/output error
Smartctl: SMART Enable Automatic Offline Failed.


I guess I'll follow up with a post to the smartmontools mailing list.

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org