Note: this tool will tell you nothing about the status of logical drives on your Smartarray, nor is it intended to. It tells you about physical disks.
You will eed to get the smartmontools out of CVS rather than using the one on the smartmontools web page. I have seen the one on the web page miss drives, while the one currently in CVS finds them. It will not work with SATA drives behind a Smartarray controller but seems to work with SCSI and SAS drives behind a Smartarray controller.
To get and build smartmontools from CVS, this worked for me:
$ cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/smartmontools co sm5 $ cd sm5 $ ./autogen.sh $ ./configure $ make
If ./configure complains about cciss_ioctl.h, you may need to add the following lines near the beginning of /usr/include/linux/cciss_ioctl.h
#ifndef __KERNEL__ #define __user #endif
This is because many distributions ship a /usr/include/linux/cciss_ioctl.h which has a __user attribute on one of the ioctl structure members which is not normally defined unless you're compiling the kernel.
Also, you will need this patch to smartmontools smartctl.cpp, if it is not already in CVS by the time you read this. (Without it, only a maximum of 16 drives will be visible to smartmontools, and only if they happen to reside in the right bays.
To get physical drive information via smartctl, you must specify the disk device as well as the controller:
$ smartctl -d cciss,0 -a /dev/cciss/c0d0where "cciss,0" is specifying the first physical disk, and "/dev/cciss/c0d0" is specifying the controller.
It is not obvious how to come up with the physical disk specifier that smartctl wants for a given physical disk.
You can use a for loop to scan for disks, for example:
$ for x in `seq 0 127` > do > echo $x > smartctl -d cciss,$x -a /dev/cciss/c0d0 > done > output.txtAfter doing that once, you can dig through output.txt to figure out which numbers correspond to disks, and thereafter use smartctl with just those numbers instead of scanning every number between 0 and 127 inclusive, which is a bit slow.