CLI HPE - ssacli and hpssacli tools

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers to fully manage your storage (controllers, physical disks, logical drives, etc.).

The ssacli command replaces older hpssacli but shares the same syntax.

Launch the HPE CLI .

Go into the HPE CLI on your storage:

$ sudo ssacli      // HPE Proliant
$ sudo hpssacli // HPE Smart Storage Administrator

Or you can directly call them by using the following:

$ sudo ssacli <command>     // HPE Proliant
$ sudo hpssacli <command> // HPE Smart Storage Administrator

Using the ssacli/hpssacli tool .

All commands have a short name to reduce the length of the total input provided to the ssacli tool. You can use short or long name.

List of long and short names:

  • chassisname = ch
  • controller = ctrl
  • logicaldrive = ld
  • physicaldrive = pd
  • drivewritecache = dwc
  • licensekey = lk

You can specify disks also as:

  • A range of drives (bay 1 to 3): 1I:1:1-1I:1:3
  • Drives that are unassigned: allunassigned

Check commands .

This commands is using to have a global views on the storage health:

$ sudo ssacli ctrl all show status
$ sudo hpssacli ctrl all show status

Smart Array P431 in Slot 0 (Embedded)
Controller Status: OK
Cache Status: OK
Battery/Capacitor Status: OK

$ sudo ssacli ctrl all show config
$ sudo hpssacli ctrl all show config

Smart Array P431 in Slot 0 (Embedded)

Note: Predictive Spare Activation Mode is enabled, physical drives that are in predictive failure state will not be available for use as data or spare drives.

(sn: PCABCDEF0123456)

Port Name: 1E
Port Name: 2E

D3710 at Port 1E, Box 1, OK
array A (SAS, Unused Space: 0 MB)

logicaldrive 1 (9.9 TB, RAID 6, OK)

physicaldrive 1E:1:1 (port 1E:box 1:bay 1, SAS, 4800.3 GB, OK)
physicaldrive 1E:1:2 (port 1E:box 1:bay 2, SAS, 4800.3 GB, OK)
physicaldrive 1E:1:3 (port 1E:box 1:bay 3, SAS, 4800.3 GB, OK)
physicaldrive 1E:1:4 (port 1E:box 1:bay 4, SAS, 4800.3 GB, OK)
physicaldrive 1E:1:5 (port 1E:box 1:bay 5, SAS, 4800.3 GB, OK)
physicaldrive 1E:1:6 (port 1E:box 1:bay 6, SAS, 4800.3 GB, OK, spare)

Enclosure SEP (Vendor ID HPE, Model D3710) 377 (WWID: 5001234567ABCD1E, Port: 2E, Box: 1)
Enclosure SEP (Vendor ID HPE, Model D3710) 378 (WWID: 5001234567ABCD1C, Port: 1E, Box: 1)
Expander 379 (WWID: 5001234567ABCD1F, Port: 2E, Box: 1)
Expander 380 (WWID: 5001234567ABCD1D, Port: 1E, Box: 1)

Command examples

Show available controllers:

=> ctrl all show

Show controllers status:

=> ctrl all show status

Show detailed controllers information:

=> ctrl all show detail

Show controllers configuration:

=> ctrl all show config

Rescan for new devices Useful after swapping disks in bays, etc…:

=> rescan

Show all physical disks (or their status) (controller slot 0):

=> ctrl slot=0 pd all show
=> ctrl slot=0 pd all show status

Show all physical disks detailed information (controller slot 0):

=> ctrl slot=0 pd all show detail

Show logical drives (or their status) (controller slot 0, all or specific logical drive(s)):

=> ctrl slot=0 ld all show
=> ctrl slot=0 ld all show status

=> ctrl slot=0 ld 1 show
=> ctrl slot=0 ld 1 show status

Show detailed logical drives information (controller slot 0, all or specific logical drive(s)):

=> ctrl slot=0 ld all show detail
=> ctrl slot=0 ld 1 show detail

Show array information (controller slot 0, array A):

=> ctrl slot=0 array a show

Show array status (controller slot 0, all arrays):

=> ctrl slot=0 array all show status

Create new RAID 0 logical drive (controller slot 0, disk in port 1I:box 1:bay 1):

=> ctrl slot=0 create type=ld drives=1I:1:1 raid=0

Create new RAID 1 logical drive (controller slot 0, disks in port 1I:box 1:bay 1 and 2):

=> ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=1

Create new RAID 5 logical drive (controller slot 0, diks in port 1I:box 1:bay 1 to 4):

=> ctrl slot=0 create type=ld drives=1I:1:1-1I:1:4 raid=5

Delete logical drive (controller slot 0, logical drive 1):

=> ctrl slot=0 ld 1 delete

Add new physical disks to logical drive (controller slot 0, logical drive 1, disks in port 1I:box 1:bay 6 and 7):

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

Add spare disks (controller slot 0, logical drive 1, array A, disks in port 1I:box 1:bay 6 and 7):

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

Add global spare disks (controller slot 0, logical drive 1, all arrays, disks in port 1I:box 1:bay 6 and 7):

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

Turn on/off blink logical drive LED (controller slot 0, logical drive 1):

=> ctrl slot=0 ld 1 modify led=on
=> ctrl slot=0 ld 1 modify led=off

Turn on/off blink physical disk LED (controller slot 0, physical disk port 1I:box 1:bay 1):

=> ctrl slot=0 pd 1I:1:1 modify led=on
=> ctrl slot=0 pd 1I:1:1 modify led=off

Modify smart array cache read and write ratio (controller slot 0, cacheratio 80% read/20% write):

=> ctrl slot=0 modify cacheratio=80/20

Show physical drive write cache status (controller slot 0):

=> ctrl slot=0 modify dwc=?

Enable/disable physical drive write cache (controller slot 0) Important: Because physical drive write cache is not battery-backed, you could lose data if a power failure occurs during a write process. To minimize this possibility, use a backup power supply:

=> ctrl slot=0 modify dwc=enable
=> ctrl slot=0 modify dwc=disable

Show status of smart array write cache when no battery is present (no-battery write cache option, controller slot 0):

=> ctrl slot=0 modify nbwc=?

Enable/disable smart array write cache when no battery is present (no-battery write cache option, controller slot 0):

=> ctrl slot=0 modify nbwc=enable
=> ctrl slot=0 modify nbwc=disable

Enable/disable smart array cache for certain Logical Volume (controller slot 0, logical drive 1):

=> ctrl slot=0 ld 1 modify arrayaccelerator=enable
=> ctrl slot=0 ld 1 modify arrayaccelerator=disable

Enable/disable SSD Smart Path (controller slot 0, array A):

=> ctrl slot=0 array a modify ssdsmartpath=enable
=> ctrl slot=0 array a modify ssdsmartpath=disable

Show spare activation mode

=> ctrl slot=0 modify spareactivationmode=?

Set spare activation mode

=> ctrl slot=0 modify spareactivationmode=predictive
=> ctrl slot=0 modify spareactivationmode=failure

Show rebuild priority:

=> ctrl slot=0 modify rp=?

Modify rebuild priority:

=> ctrl slot=0 modify rp=low
=> ctrl slot=0 modify rp=medium
=> ctrl slot=0 modify rp=mediumhigh
=> ctrl slot=0 modify rp=high

Erase Physical Drive (controller slot 0, physical disk port 1I:box 1:bay 1):

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

Help Command

The help command: .

=> help

CLI Syntax
A typical SSACLI 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 optional
variable, the structure of a typical SSACLI command line is as follows:

<target> <command> [parameter=value]

<target> is of format:
[controller all|slot=#|serialnumber=#]
[array all|<id>]
[physicaldrive all|allunassigned|[#:]#:#|[#:]#:#-[#:]#:#]
[ssdphysicaldrive all|allunassigned|[#:]#:#|[#:]#:#-[#:]#:#]
[logicaldrive all|#]
[enclosure all|#:#|serialnumber=#]
[licensekey all|<key>]
[ssdinfo]
Note 1: The #:#:# syntax is only needed for systems that
specify port:box:bay. Other physical drive targeting
schemes are box:bay and port:id.

Example targets:
("CN0" is a sample port name that may be different depending on the
controller)
controller slot=5
controller serialnumber=P21DA2322S
controller slot=7 array A
controller slot=5 logicaldrive 5
controller slot=5 physicaldrive 1:5
controller slot=5 physicaldrive CN0:2:3
controller slot=5 ssdphysicaldrive all
controller slot=5 enclosure CN0:1 show
controller slot=5 licensekey XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

For detailed command information type any of the following:
help add
help create
help delete
help diag
help flash
help heal
help modify
help remove
help shorthand
help show
help target
help rescan
help version

Encryption related commands:
help ctrlpasswdstate
help clearencryptionconfig
help encode
help encrypt
help enableencryption
help encryption
help eula
help fwlock
help import
help instantsecureerase
help localkeymanagermode
help login
help logout
help recoverpassword
help rekey
help remotekey
help removectrlpasswd
help rescankeys
help setmasterkeycache
help setctrlpasswd
help setpasswd
help setrecoveryparams
help unlockvolumes

Help also accepts commonly used CLI parameters and SSA keywords. Adding
additional keywords will further filter the help output. Examples:
help migrate
help expand
help extend
help <keyword> <keyword> ... <keyword>

Documentation

https://gist.github.com/mrpeardotnet/a9ce41da99936c0175600f484fa20d03
https://cmdref.net/hardware/proliant/hpssacli.html
https://cmdref.net/hardware/proliant/index.html
HPE-Smart-Storage-Administrator-Manuel.pdf

> Partager <