HP Servers: hwraidinfo and hwraidstatus in Linux

Working with the RAID configurations on Linux can be a little involved if all you have is hpacucli. Luckily, the folks using HP's OS distributions will get tools like hwraidinfo and hwraid status, but you can get these going in Linux as well.

Here's a bash script equivalent of hwraidinfo which will work in Linux:

#!/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

And here is the script equivalent of hwraidstatus:

#!/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

Save these to the filesystem, run chmod +x and move them to /usr/sbin (or /usr/local/sbin) so that the root user can use them.

Printed from: http://rackerhacker.com/2008/06/13/hp-servers-hwraidinfo-and-hwraidstatus-in-linux/ .
© Major Hayden 2012.

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this