Adaptec Hardware RAID controller on Sun 4150

On our Oracle Sun x4150’s the Hardware Raid can be checked after installing the StorMan software which is available (as StorMan-6.40.x86_64.rpm)  in the software bundle for x4150s available after logging in to the Oralce support website and locating the downloads for x4150s. The download is pretty big (931MB) when the 39MB RPM is all you are after.

I used the following shell script as a nagios plugin to check the RAID status – it may be of use to someone else out there:

#!/bin/bash

EXIT_STATUS=0 # By default, everything is OK

MSG=""
RAIDTMP=/tmp/raid.out
/usr/StorMan/arcconf getconfig 1 > $RAIDTMP
if [ $? != "0" ]
then
EXIT_STATUS=1
MSG="${MSG}
exit $?"
fi
NUM_LOGICAL_DEVICES=`grep "Logical devices/Failed/Degraded" $RAIDTMP|cut -d\: -f2| cut -d\/ -f1`
TMPSTAT=`grep "Temperature" $RAIDTMP| grep "Normal" | wc -l`
LGCSTAT=`grep "Status of logical device" $RAIDTMP|cut -d\: -f2 | grep "Optimal" | wc -l`
CTLSTAT=`grep "Controller Status" $RAIDTMP|cut -d\: -f2`
DFDSTAT=`grep "Logical devices/Failed/Degraded" $RAIDTMP|cut -d\: -f2`
FSTSTAT=`grep "Failed stripes" $RAIDTMP|cut -d\: -f2 | grep "No" | wc -l`
DDCSTAT=`grep "Defunct disk drive count" $RAIDTMP|cut -d\: -f2`

if [ $TMPSTAT -ne 1 ]
then
EXIT_STATUS=1
MSG="${MSG} `grep "Temperature" $RAIDTMP` "
fi
if [ $LGCSTAT -ne $NUM_LOGICAL_DEVICES ]
then
EXIT_STATUS=1
MSG="${MSG} `grep "Status of logical device" $RAIDTMP` "
fi
if [ $CTLSTAT != "Optimal" ]
then
EXIT_STATUS=1
MSG="${MSG} `grep "Controller Status" $RAIDTMP` "
fi
if [ $DFDSTAT != "$NUM_LOGICAL_DEVICES/0/0" ]
then
EXIT_STATUS=1
MSG="${MSG} `grep "Logical devices/Failed/Degraded" $RAIDTMP` "
fi
if [ $FSTSTAT -ne $NUM_LOGICAL_DEVICES ]
then
EXIT_STATUS=1
MSG="${MSG} `grep "Failed stripes" $RAIDTMP` "
fi
if [ $DDCSTAT != "0" ]
then
EXIT_STATUS=1
MSG="${MSG} `grep "Defunct disk drive count" $RAIDTMP` "
fi

MSG="${MSG}"

rm $RAIDTMP

if [ $EXIT_STATUS -eq 1 ]; then
echo "WARNING - Possible Adaptec Hardware RAID issues $MSG"
exit 1
else
echo "OK - Adaptec Hardware RAID appears OK $MSG"
exit 0
fi

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>