Infrastructure at your Service

David Hueber

hpacucli: Storage management on HP servers through command line

For sure you already used, or at least heard about, the HP Smartstart Kit. This especially includes the storage management part ACU: Array Configuration Utility. This tool is pretty straightforward to configure the storage and RAID volumes before installing an HP server.

However did you know that these features are also available in command line? This is what hpacucli does…

hpacucli is usally automatically installed as part of a standard Linux installation.
[[email protected] ~]# rpm -qa |grep hpacuhpacucli-9.10-22.0

If it is missing you easily download it from the HP web site:

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=US&swItem=MTX-bb75f18abff04534afd617ff8a&mode=4&idx=1

It provides several features for Smart Array and Raid Array controller configuration:

  • Show the current status
  • Create new logical drives
  • Add physical drives (disks) or spare drive to an array or logical drive
  • Change settings for either physical or logical drives as well as arrays
  • Remove drives
  • Extend a logical drive
  • Rescan for new controllers
  • Generate a nice diagnostic report

The principle is to run these operations on so called targets. The tool supports several target’s types which are hierarchically classified:

  • Controller
  • Slot
  • Enclosure
  • Logical Drive
  • Physical Drive

To start working with hpacucli, simply log in as root and run the command hpacucli:

[[email protected] ~]# hpacucli
HP Array Configuration Utility CLI 9.10.22.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.Type "exit" to close the console.=>

Then the best way to get starting with the CLI interface is to run the command help, which provides detailed information on available options and commands.

=> helpCLI SyntaxA typical ACU CLI command line consists of three parts: a target device,a command, and a parameter with values if necessary. Using angle brackets to denote a required variable and plain brackets to denote an optionalvariable, the structure of a typical ACU CLI command line is as follows:

<target> <command> [parameter=value]   <target> is of format:
[controller all|slot=#|wwn=#|chassisname=”AAA”|
serialnumber=#|chassisserialnumber=#|ctrlpath=#:# ] [array all|<id>] [physicaldrive all|allunassigned|[#:]#:#|[#:]#:#-[#:]#:#] [logicaldrive all|#] [enclosure all|#:#|serialnumber=#|chassisname=#] [licensekey all|<key>]

I won’t provide here a complete description of all possible features, the help does it pretty well, but I’m going to show you some useful commands to illustrate how to use hpacucli.

Checking the status and configuration

The first interesting part is to get a status and display the configuration information for the different elements. This works through the command show.

=> ctrl all show statusFIRMWARE UPGRADE REQUIRED:A firmware update is recommended for this controller to prevent rare potential data write errors
on a RAID 1 or RAID 1+0 volume in a scenario of concurrent background surface analysis and I/O write operations.
Please refer to Customer Advisory c01587778 which can be found at hp.com.

Smart Array P400 in Slot 9Controller Status: OK
Cache Status: OKBattery/Capacitor Status: OK

Smart Array P600 in Slot 2Controller Status: OKCache Status: OK
Battery/Capacitor Status: OK

As shown above, we can see that through show status, we even get customers’ recommendations (for instance: FIRMWARE UPGRADE REQUIRED).
Now we could have specifically a look to the configuration of the P600 controller in slot 2

=> ctrl slot=2 show config
Smart Array P600 in Slot 2               (sn: P92B30R9SUC0OJ)

array A (SAS, Unused Space: 0 MB)logicaldrive 1 (683.5 GB, RAID 1+0, OK)physicaldrive 1E:1:1 (port 1E:box 1:bay 1, SAS, 146 GB, OK)physicaldrive 1E:1:2 (port 1E:box 1:bay 2, SAS, 146 GB, OK)
physicaldrive 1E:1:3 (port 1E:box 1:bay 3, SAS, 146 GB, OK)
physicaldrive 1E:1:4 (port 1E:box 1:bay 4, SAS, 146 GB, OK)
physicaldrive 1E:1:5 (port 1E:box 1:bay 5, SAS, 146 GB, OK)
physicaldrive 1E:1:6 (port 1E:box 1:bay 6, SAS, 146 GB, OK)
physicaldrive 1E:1:7 (port 1E:box 1:bay 7, SAS, 146 GB, OK)
physicaldrive 1E:1:8 (port 1E:box 1:bay 8, SAS, 146 GB, OK)
physicaldrive 1E:1:9 (port 1E:box 1:bay 9, SAS, 146 GB, OK)
physicaldrive 1E:1:10(port 1E:box 1:bay 10, SAS, 146 GB, OK)

array B (SAS, Unused Space: 0 MB)logicaldrive 2 (136.7 GB, RAID 1, OK)
physicaldrive 1E:1:11 (port 1E:box 1:bay 11, SAS, 146 GB, OK)physicaldrive 1E:1:12 (port 1E:box 1:bay 12, SAS, 146 GB, OK)
array C (SAS, Unused Space: 0 MB)logicaldrive 3 (838.1 GB, RAID 1+0, OK)physicaldrive 1E:1:13 (port 1E:box 1:bay 13, SAS, 300 GB, OK)physicaldrive 1E:1:14 (port 1E:box 1:bay 14, SAS, 300 GB, OK)
physicaldrive 1E:1:15 (port 1E:box 1:bay 15, SAS, 300 GB, OK)
physicaldrive 1E:1:16 (port 1E:box 1:bay 16, SAS, 300 GB, OK)
physicaldrive 1E:1:17 (port 1E:box 1:bay 17, SAS, 300 GB, OK)
physicaldrive 1E:1:18 (port 1E:box 1:bay 18, SAS, 300 GB, OK)

Expander 123 (WWID: 500143800031B580, Port: 1E, Box: 1)Enclosure SEP (Vendor ID HP, Model MSA70) 122 (WWID: 500143800031B5A5, Port: 1E, Box: 1)

 

We see here that we have 3 logical drives configured on this controller:

  • Logical drive 1 (ld1) in RAID1+0
  • Logical drive 2 (ld2) in RAID 1
  • Logical drive 3 (ld3) in RAID 1+0

In addition the command provides the list of physical drives (disks) assigned to each logical drive and their current state.
In case you just want to get a brief status of a particular logical drive, without getting all details, you could easily address it directly:

=> ctrl slot=2 ld 2 show status
FIRMWARE UPGRADE REQUIRED:
A firmware update is recommended for this controller to prevent rare potential data write errorson a RAID 1 or RAID 1+0 volume in a scenario of concurrent background surface analysis and I/O write operations.Please refer to Customer Advisory c01587778 which can be found at hp.com.

logicaldrive 2 (136.7 GB, RAID 1): OK

Note that the config command can only be used on controller level. You can’t specify a logical drive.

Diagnostic report

When facing I/O errors or volume corruption, a good practice is to request a diagnostic report for all controllers and drives. This is pretty easy to get using hpacucli. Give a try to the following command: ctrl all diag file=/tmp/ACU_report.zip

=> ctrl all diag file=/tmp/ACU_report.zipFIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller to prevent rare potential data write errors on a RAID 1 or RAID 1+0 volume in a scenario of concurrent background surface analysis and I/O write operations. Please refer to Customer Advisory c01587778 which can be found at hp.com.FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller to prevent rare potential data write errors on a RAID 1 or RAID 1+0 volume in a scenario of concurrent background surface analysis and I/O write operations. Please refer to Customer Advisory c01587778 which can be found at hp.com.Generating diagnostic report...done

 

By default the report is generated in a compressed format. Therefore the given file extension must be .zip. This can be deactivated by setting the option zip=off in the command.
Once you have extracted the zip file, you will get a folder containing an HTML report with all the belonging files.

Simply open the HTM file and you will get a detailed report on the state and configuration settings of you controllers going down to every single physical drive.

We can see in the example above that my logical drive 1 on my second controller (P600) has failed. In fact the disks 4 & 9 seem to be broken.

Using the integrated hypertext links, I can have a look in more details on what the issue is and its impact. I can for instance check the mirror setup of my logical drive.

Arrgh….. Looking to position 11 and 16, shows that I have lost the two pieces of a mirror… Cry

So I hope that this small introduction to hpacucli will help you to manage your Array controllers easily through the command lines.
Enjoy! 😀

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

David Hueber
David Hueber

Chief Executive Officer (CEO), Principal Consultant