Monitoring LSI Logic RAID controllers

I managed a fair number of Dell and Sun servers that use LSI Logic RAID controllers. To ensure that a disk failure in one of our servers is quickly located and fixed, I started poking around the web this week to locate a tool that was capable of monitoring our RAID controllers and disk drives. My searches led me to the mpt-status utility, which is an opensource tool for monitoring LSI Logic RAID controllers.

Mpt-status is a relatively simple utility, and can be run without any options to report the status of all LSI Logic RAID controllers and the disk drives that live behind those controllers:

$ mpt-status

ioc0 vol_id 0 type IM, 2 phy, 136 GB, state OPTIMAL, flags ENABLED
ioc0 phy 0 scsi_id 0 SEAGATE  ST3146707LC      D704, 136 GB, state ONLINE, flags NONE
ioc0 phy 1 scsi_id 1 SEAGATE  ST3146707LC      D704, 136 GB, state ONLINE, flags NONE

This will print the status of the controller and each disk drive, along with the drive manufacturer, the size of each disk drive, and the SCSI target number. To get similar information in a parseable format, the mpt-status “-s” option can be used:

$ mpt-status -s

log_id 0 OPTIMAL
phys_id 0 ONLINE
phys_id 1 ONLINE

The servers I plan to use mpt-status on run Redhat Linux, so I created an RPM specification file to assist with building and deploying the package. I also incorporated a RAID controller monitoring script into the RPM, which will install itself into /etc/cron.daily/checklsi.sh, and run daily to check the status of the controllers and disk drives. Viva la monitoring!

12 thoughts on “Monitoring LSI Logic RAID controllers”

  1. Any chance you can pass that complete RPM my way, please? Sounds like just what I need. Shame there’s nothing similar under Solaris!

  2. Did you have to do anything special in the way of installing packages to get the mpt-status source to build? I’ve been trying recently on RHEL/Fedora/CentOS from both the base tarball and spec, but I keep running into missing headers (for example lsi/mpi_type.h). The best indications I’ve found is that these might have been removed from the kernel tree.

  3. Hey there,

    matty, thanks for the SPEC, I found your daily script and installed it. Nice thing!

    And as another note to pgienger, as I also had some problems while compiling mpt-status… Get the kernel sources, see here “http://wiki.centos.org/HowTos/I_need_the_Kernel_Source”. mpi_type.h is then located in “drivers/message/fusion/”. For the compiler.h error I edited the mpt-status.h and hard-coded the compiler.h.

    and finally:
    [root@bart ~]# mpt-status
    ioc0 vol_id 0 type IM, 2 phy, 68 GB, state OPTIMAL, flags ENABLED
    ioc0 phy 0 scsi_id 0 IBM-ESXS CBR073C32410ESFN DFQD, 68 GB, state ONLINE, flags NONE
    ioc0 phy 1 scsi_id 1 IBM-ESXS CBR073C32410ESFN DFQD, 68 GB, state ONLINE, flags NONE

    regards

  4. Got mpt-status from:
    http://www.drugphish.ch/~ratz/mpt-status/

    Compile it Philon’s message above but I can’t get it to run with a Dell SAS/5iR card which has the SAS1068 chip. This 1068 chip is supported by mpt-status.

    Any ideas?

    # ./mpt-status
    open /dev/mptctl: No such device
    Are you sure your controller is supported by mptlinux?
    Make sure mptctl is loaded into the kernel

    # lsmod |grep mpt
    mptsas 31049 2
    mptscsih 24897 1 mptsas
    mptbase 56929 2 mptsas,mptscsih
    scsi_transport_sas 30529 1 mptsas
    scsi_mod 132685 6 sg,libata,mptsas,mptscsih,scsi_transport_sas,sd_mod

    # ls -l /dev/mptctl
    crw-r–r– 1 root root 10, 220 May 29 13:23 /dev/mptctl

  5. This can be used as nagios check works like a charm.

    #!/bin/sh

    STATUS=`/usr/bin/sudo /usr/sbin/mpt-status -s`

    if [ `/usr/bin/sudo /usr/sbin/mpt-status |grep ONLINE | wc -l` == “2” ]; then

    echo “Array OK: $STATUS”
    exit 0

    else

    echo “Array ERROR: $STATUS”
    exit 2

    fi

  6. The source to this has vanished, ‘drugphish.com’ now redirects to a generic hosting page. sourceforge points to the same site.

Leave a Reply

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