Sei sulla pagina 1di 13

hpacucli: Storage management on HP servers through command

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

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 targets types which are hierarchically classified:
Controller
Slot
Enclosure
Logical Drive
Physical Drive

Display Controller
To display the detailed status of the controller
# hpacucli

ctrl all show status

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
Now we could have specifically a look to the configuration of the P600 controller
in slot 2

1 => ctrl slot=2 show config


2 Smart Array P600 in Slot 2 (sn: P92B30R9SUC0OJ)
3
4 array A (SAS, Unused Space: 0 MB)logicaldrive 1 (683.5 GB, RAID 1+0,
5 OK)
6 physicaldrive 1E:1:1 (port 1E:box 1:bay 1, SAS, 146 GB, OK)
7 physicaldrive 1E:1:2 (port 1E:box 1:bay 2, SAS, 146 GB, OK)
8 physicaldrive 1E:1:3 (port 1E:box 1:bay 3, SAS, 146 GB, OK)
9 physicaldrive 1E:1:4 (port 1E:box 1:bay 4, SAS, 146 GB, OK)
10 physicaldrive 1E:1:5 (port 1E:box 1:bay 5, SAS, 146 GB, OK)
11 physicaldrive 1E:1:6 (port 1E:box 1:bay 6, SAS, 146 GB, OK)
12 physicaldrive 1E:1:7 (port 1E:box 1:bay 7, SAS, 146 GB, OK)
13 physicaldrive 1E:1:8 (port 1E:box 1:bay 8, SAS, 146 GB, OK)
14 physicaldrive 1E:1:9 (port 1E:box 1:bay 9, SAS, 146 GB, OK)
15 physicaldrive 1E:1:10(port 1E:box 1:bay 10, SAS, 146 GB, OK)
16
17 array B (SAS, Unused Space: 0 MB)logicaldrive 2 (136.7 GB, RAID 1, OK)
18
19 physicaldrive 1E:1:11 (port 1E:box 1:bay 11, SAS, 146 GB, OK)
20 physicaldrive 1E:1:12 (port 1E:box 1:bay 12, SAS, 146 GB, OK)
21 array C (SAS, Unused Space: 0 MB)logicaldrive 3 (838.1 GB, RAID 1+0,
22 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 (

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 case you just want to get a brief status of a particular logical drive, without
getting all details, you could easily address it directly:

1 => ctrl slot=2 ld 2 show status


2 FIRMWARE UPGRADE REQUIRED:
3 A firmware update is recommended for this controller to prevent rare
4 potential data write errorson a RAID 1 or RAID 1+0 volume in a scenario
5 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
View Drive Status
To display the status of the physical drive

ctrl slot=0 pd all show status

physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 146 GB): OK

physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 146 GB): OK

physicaldrive 1I:1:3 (port 1I:box 1:bay 3, 300 GB): OK

physicaldrive 1I:1:4 (port 1I:box 1:bay 4, 300 GB): OK

physicaldrive 2I:1:6 (port 2I:box 1:bay 6, 300 GB): OK

physicaldrive 2I:1:7 (port 2I:box 1:bay 7, 300 GB): OK

physicaldrive 2I:1:8 (port 2I:box 1:bay 8, 300 GB): OK

View Individual Drive Status


To display the detail status of a specific physical drive, do the following.

In this example, we like to know the status of pd (physical disk) in slot 0.


The specific disk is 2I:1:6, which we figured it out from the output of the
previous command.

As shown in the output below, this displays the Serial Number, Make, Model,
Size and Fireware version of this specific disk. This can be very helpful during
troubleshooting.

=> ctrl slot=0 pd 2I:1:6 show detail

Smart Array P410i in Slot 0 (Embedded)

unassigned

physicaldrive 2I:1:6

Port: 2I
Box: 1

Bay: 6

Status: OK

Drive Type: Unassigned Drive

Interface Type: SAS

Size: 300 GB

Rotational Speed: 10000

Firmware Revision: HPD4

Serial Number: EB01PC416C4C1214

Model: HP EG0300FBDSP

Current Temperature (C): 38

Maximum Temperature (C): 56

PHY Count: 2

PHY Transfer Rate: 6.0Gbps, Unknown

View All Logical Drives


The following command will display all available logical drives on the system.
As shown in the output below, we currently have only one logical drive in
RAID 1 with total size of around 136GB.

=> ctrl slot=0 ld all show

Smart Array P410i in Slot 0 (Embedded)

array A

logicaldrive 1 (136.7 GB, RAID 1, OK)


Create New RAID 5 Logical Drive
Execute the following command to create a new logical drive using RAID 5
option.

=> ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:6,2I:1:7,2I:1:8 raid=5

The above command creates a logical drive with the five physical drives on
RAID 5 configuration in slot 0.

Once these logical drives are created, you should see the disks from the fdisk
and you can format it from there and start using it.

After you create a logical drive, execute the following command to verify that
the LD got created. In this example, it shows that the RAID 5 logical drive got
created successfully.

=> ctrl slot=0 ld all show status

logicaldrive 1 (136.7 GB, RAID 1): OK

logicaldrive 2 (1.1 TB, RAID 5): OK

10. Rescan for New Devices


If youve added new physical hard disk, they wont automatically show-up
immediately. You have to scan for new devices as shown below.

=> rescan

. Delete Logical Drive


To delete a logical drive with the number 2 use the below command.

=> ctrl slot=0 ld 2 delete

Warning: Deleting an array can cause other array letters to become renamed.

E.g. Deleting array A from arrays A,B,C will result in two remaining

arrays A,B ... not B,C


Warning: Deleting the specified device(s) will result in data being lost.

Continue? (y/n) y

Add New Physical Drive to Logical Volume


To add the new drives to existing logical volume, do the following.

=> ctrl slot=0 ld 2 add drives=2I:1:6,2I:1:7

In this example, we are adding two additional drives specified above to the
logical volume number 2.

14. Add Spare Disks


To add the spare disks to arrays that can be used in case of disk failures on one
of the logical drives, do the following:

=> ctrl slot=0 array all add spares=2I:1:6,2I:1:7

Enable or Disable Cache


The below commands enable or disable cache for the entire slot.

=> ctrl slot=0 modify dwc=disable

=> ctrl slot=0 modify dwc=enable

16. Erase Physical Drive


Execute the following command to erase a physical drive in array B on slot 0.

=> ctrl slot=0 pd 2I:1:6 modify erase

17. Blink Physical Disk LED


To blink the LED on the physical drives for the logical drive 2, do the following.
This will make the LEDs blink on all the physical drives that belongs to logical
drive 2.
=> ctrl slot=0 ld 2 modify led=on

Once you know which drive belongs to logical drive 2, turn the LED blinking
off as shown below.

=> ctrl slot=0 ld 2 modify led=off

Manage HP Proliant Server with HPASMCLI Utility.

HPASM is the management tools package for the HP Proliant server series. It
can be used to display the System or Bios setting as well as the hardware status
of the Proliant servers. The utility is very useful in the automation jobs as the CLI
can be included in the shell scripts. The tool can be launched in CLI or directly
from shell with proper arguments . Type hpasmcli in the shell to start it in CLI
mode.

hpasmcli -s "show server; show uid"

SHOW [ ASR | BOOT | DIMM | F1 | FANS | HT | IML | IPL | NAME | PORTMAP

| POWERSUPPLY | PXE | SERIAL [ BIOS | EMBEDDED | VIRTUAL ] | SERVER


|

TEMP | UID | WOL ]

Show the current status or configuration of the selected


feature.

ASR - Displays the Automatic System Recovery status and timeout.

BOOT - Displays the current first boot device and one time
boot

option.

DIMM - Displays the current memory dimm configuration.

F1 - Displays the configuration of the POST F1 prompt.

FANS - Displays the current status and fan configuration.

HT - Displays the status of Processor Hyper-Threading.


IML - Displays the Integrated Management Log.

IPL - Displays the current boot order.

NAME - Displays the System Name.

PORTMAP - Displays the NIC port Mapping information.

POWERSUPPLY - Displays current Powersupply status and


configura-

tion.

PXE - Displays the PXE configuration of each embedded NIC.

SERIAL BIOS - Displays the current BIOS console redirection


port

setting.

SERIAL EMBEDDED - Displays the current embedded serial port


set-

ting.

SERIAL VIRTUAL - Displays the current virtual serial port


setting.

SERVER - Displays various information about the system.

TEMP - Displays the current status of the temperature sensors.

UID - Displays the current status of the UID LED.

WOL - Displays the current Wake-On-Lan configuration.

EXAMPLES

Show the system fan and temp status.

hpasmcli -s SHOW FAN; SHOW TEMP

Turn the UID on.

hpasmcli -s SET UID ON

To get the basic information about server:


hpasmcli> show server
System : ProLiant DL385 G1
Serial No. : SGH532X0KK
ROM version : A05 06/14/2005
iLo present : Yes
Embedded NICs : 2
NIC1 MAC: 00:14:38:4c:62:3e
NIC2 MAC: 00:14:38:4c:62:3d

Processor: 0
Name : AMD Opteron
Stepping :2
Speed : 2200 MHz
Bus : 0 MHz
Socket :2
Level2 Cache : 1024 KBytes
Status : Ok

Processor: 1
Name : AMD Opteron
Stepping :2
Speed : 2200 MHz
Bus : 0 MHz
Socket :1
Level2 Cache : 1024 KBytes
Status : Ok

Processor total : 2

Memory installed : 1024 MBytes


ECC supported : Yes

Verify the Automatic System Recovery values:


hpasmcli> show asr
ASR timeout is 10 minutes.
ASR is currently enabled.

To verify the boot order:

hpasmcli> show boot


First boot device is: CD-ROM.
One time boot device is: Not set.

To check the DIMM Information:

hpasmcli> show dimm


DIMM Configuration
------------------
Cartridge #: 0
Module #: 3
Present: Yes
Form Factor: 9h
Memory Type: 12h
Size: 1024 MB
Speed: 400 MHz
Status: Ok

Cartridge #: 0
Module #: 4
Present: Yes
Form Factor: 9h
Memory Type: 12h
Size: 1024 MB
Speed: 400 MHz
Status: Ok

To check the F1 Prompt:

hpasmcli> show f1
The POST F1 prompt is currently delayed.

To Verify the FANS:

hpasmcli> show fans


Fan Location Present Speed of
max Redundant Partner Hot-pluggable
--- -------- ------- ----- ------ --------- ------- -------------
#1 PROCESSOR_ZONE Yes NORMAL
18% Yes 2 Yes
#2 PROCESSOR_ZONE Yes NORMAL
18% Yes 1 Yes
#3 I/O_ZONE Yes NORMAL
18% Yes 1 Yes
#4 I/O_ZONE Yes NORMAL
18% Yes 1 Yes
#5 PROCESSOR_ZONE Yes NORMAL
18% Yes 1 Yes
#6 PROCESSOR_ZONE Yes NORMAL
18% Yes 1 Yes
#7 POWERSUPPLY_BAY Yes NORMAL
18% Yes 1 Yes
#8 POWERSUPPLY_BAY Yes NORMAL
18% Yes 1 Yes
To Verify the HT Status:

hpasmcli> show ht
Processor hyper-threading is currently disabled.

To view the IML Logs:

hpasmcli> show iml


The IML Log is empty.

hpasmcli> show ipl


IPL (Standard Boot Order)
-------------------------
#0 CDROM
#1 Floppy
#2 USBKEY
#3 HDD
#4 PXE

To check the Power Supply Status:

hpasmcli> show powersupply


Power supply #1
Present : Yes
Redundant: No
Condition: Ok
Hotplug : Supported

Power supply #2
Power Supply not present

To check the PXE status of the network cards:

hpasmcli> show pxe


PXE boot status (2 Embedded NICs):
NIC1: PXE enabled
NIC2: PXE disabled

To check the Serial Port status:

hpasmcli> show serial bios


BIOS console redirection port is currently set to COM1/9600.

hpasmcli> show serial bios


Embedded serial port A: COM1
Embedded serial port B: Disabled

hpasmcli> show serial virtual


The virtual serial port is currently COM2.

To check the temperature of the server:

hpasmcli> show temp


Sensor Location Temp Threshold
------ -------- ---- ---------
#0 SYSTEM_BD - -
#1 CPU#1 51C/123F 80C/176F
#2 I/O_ZONE 52C/125F 62C/143F
#3 CPU#2 46C/114F 80C/176F
#4 PROCESSOR_ZONE 41C/105F 60C/140F
#5 POWER_SUPPLY_BAY 41C/105F 51C/123F

To check LED status:

hpasmcli> show uid


UID is currently off.

To check the Wake on LAN status:

hpasmcli> show wol


Wake-On-Lan is currently enabled.

To exit from hpasmcli:

hpasmcli> exit

Potrebbero piacerti anche