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:
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:
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!