When using a RAID hardware on a linux server, we need to find out if a disk failed. If you use a Compaq/HP server, chances are that you are using a CCISS driver to access the raid device.
In that case, you can install an HP package that will work on fedora and other flavour of linux. You get it from <a href="wget ftp://ftp.compaq.com/pub/products/servers/supportsoftware/linux/hpacucli-7.20-16.linux.rpm">here</a>.
Then you can use the following 2 scripts :
Here is "hwraidinfo":
-----cut here----------
#!/bin/sh
SLOTLIST=$(hpacucli ctrl all show | \
grep Slot | sed -e 's/^.*Slot //g' -e 's/ .*$//g')
for i in $SLOTLIST
do
echo
hpacucli ctrl slot=$i show | grep -v "^$"
echo
hpacucli ctrl slot=$i ld all show | grep -v "^$"
hpacucli ctrl slot=$i pd all show | grep -v "^$"
done
echo
---------cut here--------------
And "hwraidstatus":
---------cut here--------------
#!/bin/sh
SLOTLIST=$(hpacucli ctrl all show | \
grep Slot | sed -e 's/^.*Slot //g' -e 's/ .*$//g')
for i in $SLOTLIST
do
echo
hpacucli ctrl slot=$i show status | grep -v "^$"
echo
hpacucli ctrl slot=$i ld all show status | grep -v "^$"
hpacucli ctrl slot=$i pd all show status | grep -v "^$"
done
echo
-------------cut here------------
This was posted by Matti Kurkela.