Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Has anyone used the HP Array Configuration Utility Command Line Interface (hpacucli.exe) to get physical disk information into a file?

I'm not at the machine right now, but basically I want to find out what the state of each of the physical disks in my server, i.e. Good, Failed, Failure predicted, Rebuilding, missing etc.

I want to run this from a script, so a single (or set of) commands I can pipe to a file is what I'm looking for.

share|improve this question
    
is there a reason you don't want the hp management agents to email you (or throw some action) when a disk is not good? –  Jim B Nov 26 '11 at 23:07
    
I'm afraid that there is no email, and the servers are not all conveniently networked –  FrinkTheBrave Jan 3 '12 at 12:32
add comment

3 Answers

up vote 6 down vote accepted

My favorite example:

This can be run from the shell or within the tool.

hpacucli ctrl all show config (use hpacucli.exe for Windows)

Or

hpacucli ctrl all show config detail

But, if you have the HP Management Agents installed anyway, you should have realtime monitoring of RAID status pushing back to email alerts or an external monitoring system. Either way, this can generate a point-in-time output/status.

[root@Bootylicious ~]# hpacucli ctrl all show config

Smart Array P410i in Slot 0 (Embedded)    (sn: 50123456789ABCDE)

   array A (SAS, Unused Space: 0 MB)


      logicaldrive 1 (1.6 TB, RAID 1+0, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600.1 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 600.1 GB, OK)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 600.1 GB, OK)
      physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 600.1 GB, OK)
share|improve this answer
    
Thanks, is there a way of getting each physical drive line by bay number. I can do controller slot=1 physicaldrive 1I:1:5 show status but I don't want to have to specify the slot, port or box number. Something like controller all bay 5 show status –  FrinkTheBrave Jan 3 '12 at 12:52
    
For now I'm using: ctrl all show config | findstr /I /R /C:bay.5 –  FrinkTheBrave Jan 3 '12 at 13:05
add comment

I understand you use windows OS on your host. Please find list of useful commands for hpacucli for Linux. You might find some of them useful anyway.

sudo /usr/sbin/hpacucli controller all show status
/usr/sbin/hpacucli ctrl slot=1 pd all show detail|grep -i -P '.*(physicaldrive|Firmware|Status).*'
sudo /usr/sbin/hpacucli ctrl all show
sudo /usr/sbin/hpacucli ctrl slot=5 pd all show

show disk physical info

for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I pd all show; done

show disk logical info

for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I pd all show; done

BBU Controller info

for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I show detail; done

switch on disk ID light

sudo /usr/sbin/hpacucli ctrl slot=4 pd 1E:1:13 modify led=on

some other ...

for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I show; done

sudo /usr/sbin/hpacucli ctrl slot=4 pd 1E:1:13 show

for I in `sudo /usr/sbin/hpacucli ctrl all show | awk '{ print $6 }'`; do sudo /usr/sbin/hpacucli ctrl slot=$I show detail|grep -i -P '.*(physicaldrive|Firmware|Status).*'; done
share|improve this answer
add comment

There are already existing monitoring scripts that do this (for Nagios for example).
Here is how it would work (adjust controller ID accordingly):

hpacucli.exe ctrl all show
Smart Array XXX in Slot 2     (sn: XXXXXXXXXXXX)

hpacucli.exe controller slot=2 physicaldrive all show status
physicaldrive 1:0 (port 1:id 0, X GB): OK
physicaldrive 1:1 (port 1:id 1, X GB): OK
physicaldrive 1:2 (port 1:id 2, X GB): OK
physicaldrive 1:3 (port 1:id 3, X GB): OK
physicaldrive 1:4 (port 1:id 4, X GB): OK
physicaldrive 1:5 (port 1:id 5, X GB): OK

hpacucli.exe controller slot=2 logicaldrive all show status
logicaldrive 1 (X GB, RAID 5):  OK
logicaldrive 2 (X GB, RAID 5):  OK
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.