Solaris needs SMART support! Please help!

While attempting to run the smartctl utility a few weeks back on an x86 Solaris 10 host with IDE disk drives, I received the following error:

$ smartctl -a /dev/dsk/c1d0s0

smartctl version 5.36 [i386-pc-solaris2.10] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

#######################################################################
ATA command routine ata_command_interface() NOT IMPLEMENTED under Solaris.
Please contact smartmontools-support@lists.sourceforge.net if
you want to help in porting smartmontools to Solaris.
#######################################################################

Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)

A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

It turns out this error is caused by several missing ioctls in the x86 Solaris cmdk IDE device driver. Since I have always wanted to develop (or modify) a kernel device driver, I decided to start reviewing the source code in cmdk.c to see what would be needed to make smartmontools happy. After reading through the cmdkioctl routine in cmdk.c, it dawned on me that the SPARC IDE driver, dad, contained the ioctls that are used by smartmontools. If the dad device driver used the underlying DDI framework, it would be relatively trivial to port the missing pieces from the dad driver (the SPARC IDE driver) to the cmdk driver (the x86 Solaris IDE driver). Well — it turns out the dad driver is closed source (so much for “open” solaris, ey?), so that dashed my hopes of porting code. :( Since there were two open bugs related to SMART support:

Bug ID: 4665068 SMART support in IDE driver
Bug ID: 6280687 Collect SMART data from disks and deliver info to FMA

I decided to call the Sun support center to get the current status of these bugs (I had already pinged my sales team to get the status of these bugs, but my inquiries got silently routed to /dev/null). The support folks weren’t able to tell me if and when these bugs would be fixed, but they did inform me that I could add my employers name to the bugs. They also mentioned that bug fixes are drive by customer demand, so hopefully folks who read my blog can help me out here. Since disk drives are the single component most likely to fail in a system, and SMART can help to proactively detect when a disk drive will fail, it seems only logical that Sun would devote resources to adding SMART support (or at least fixing the existing bugs so people can use third party packages). If you happen to have a support contract with Sun, I would greatly appreciate it if you could open a case (either online or by phone) and request the status of these bugs, and request that your companies name be attached to the bug. Hopefully the customers voice will be heard. :)

4 thoughts on “Solaris needs SMART support! Please help!”

  1. It looks like the dad driver is open source now and uses the DDI framework!
    http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/sun/io/dada/targets/dad.c

    Maybe Sun open-sourced it in April with its endowment of storage-related code?
    http://www.itjungle.com/tug/tug042607-story08.html

    What are the missing ioctls in cmdk? The link in your blog goes to some Italian newsletter spam.

    I just started trying Solaris, now that it supports ZFS mirror boot. But, off the bat, I’m disappointed by the lack of SMART support for x86 PATA (altho I heard of recent SMART support for certain SATA controllers). However, as a newbie, I have little hope of porting the missing pieces myself, and no idea what’s necessary (only what you’ve written here).

  2. Hi Matty, great site mate!

    I got a question for you:
    How to you actually install smartmontools on opensolaris? Did you find a better app for that os?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *