Servers & Storage

ssacli commands for HPE Smart Array: status, create, spares and rebuild checks

Use HPE ssacli to check controller, array and drive status, create logical drives, add spares and set rebuild priority on Smart Array SR controllers.

Published
Reading time
7 min read

The Smart Storage Administrator CLI (ssacli) is HPE's command-line tool for SmartRAID (SR) controllers, the Smart Array family. It is useful when you manage servers over SSH, need the same change on many hosts, or have no GUI. Every command in this guide is taken from the HPE Smart Storage Administrator CLI User Guide; only the slot numbers and drive IDs are examples you must replace with your own.

Before you start

  • ssacli works with SR controllers (SR Gen10, Gen10 Plus and Gen11). HPE MR controllers use StorCLI instead; see HPE StorCLI basics.
  • Install the SSA CLI package for your OS from HPE (it is also part of the Service Pack for ProLiant). Run it as Administrator or root.
  • On Red Hat Enterprise Linux 7.1 and later, load the sg driver first with modprobe sg; ssacli needs it to reach the controller.
  • Run read-only show commands first and note the controller slot and drive IDs before you change anything.

Start ssacli: console mode or command mode

Console mode opens an interactive => prompt where you can run several commands without restarting the tool. Command mode runs one command and exits: add the command after the program name.

OSProgram (console mode)
Linuxssacli
WindowsC:\Program Files\Smart Storage Administrator\ssacli\bin\ssacli.exe
VMware ESXi/opt/smartstorageadmin/ssacli/bin/ssacli
ssacli help
ssacli version

The examples below are written in command mode (ssacli ...). In console mode, type the same text without ssacli.

How the syntax works

A command has three parts: <target> <command> [parameter=value]. The target is a controller, array, logical drive or physical drive, for example controller slot=3, controller all, controller slot=2 array A or controller slot=3 physicaldrive 1:2-1:5. Common abbreviations are ctrl (controller), pd (physicaldrive), ld (logicaldrive), ss (stripesize) and rp (rebuildpriority); run help shorthand for the full list. To see the valid values for a parameter, enter ? as its value, for example raid=? or ss=?.

Step 1 — Check controller, array and drive status

The show command takes the form <target> show [detail]|[status], and controllers also accept show config [detail].

ssacli ctrl all show
ssacli ctrl all show config
ssacli ctrl all show status
ssacli ctrl slot=0 show config detail
ssacli ctrl slot=0 pd all show
ssacli ctrl slot=0 ld all show
ssacli ctrl slot=0 show ssdinfo
  • ctrl all show lists every controller with its slot and serial number. Use that slot number in the other commands.
  • show config lists arrays, logical drives (size, RAID level, status) and physical drives (port:box:bay, type, size, status), including unassigned drives and spares.
  • ctrl slot=N show on a single controller reports items such as Controller Status, Rebuild Priority, Cache Status, Battery/Capacitor Status and Spare Activation Mode.
  • Drive IDs appear as port:box:bay, for example 1I:1:3. Use exactly the ID shown on your server.

Step 2 — Create a logical drive

Syntax: <target> create type=ld [parameter=value]. Unlike the GUI, the CLI creates the array automatically when you name unassigned drives. Check the allowed RAID levels first, then create:

ssacli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4 raid=?
ssacli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4 raid=1
ssacli ctrl slot=0 array A create type=ld size=330 raid=5
ParameterValues (from the guide)Default
driveslist, range, all or allunassignedall
raid0|1|1adm|1+0|1+0adm|5|50|6|60|?Highest level the controller and drive count support, except 50 or 60
ssstrip size in KB, default or ?Depends on RAID level
sizeMB, min, max, maxmbr or ?max
aa (array accelerator)enable|disable|?enable

Enter sizes in MB as plain numbers, without units. The third command above adds a second logical drive to an existing array A; the drives are taken from the array. For a step-by-step GUI method, see Create an array and logical drive with SSA.

Step 3 — Add spares and set the spare activation mode

A spare must be unassigned (or a spare for another array), the same type as the array drives, and at least as large as the smallest drive in the array. The target is an array.

ssacli ctrl slot=0 array A add spares=1I:1:5
ssacli ctrl slot=0 array A add spares=1I:1:5 sparetype=autoreplace
ssacli ctrl slot=0 array A remove spares=1I:1:5
ssacli ctrl slot=0 modify spareactivationmode=predictive
ssacli ctrl slot=0 modify spareactivationmode=failure

sparetype is dedicated (default, can be shared between arrays) or autoreplace (becomes a permanent member, cannot be shared). Activation on drive failure is the default; predictive starts using the spare when a data drive reports a predictive failure. Details are in spare drives on Smart Array.

Step 4 — Rebuild priority and rebuild checks

Rebuild priority is a controller setting: low (normal I/O first), medium (rebuild half of the time), mediumhigh and high (rebuild before other operations).

ssacli ctrl slot=0 modify rp=?
ssacli ctrl slot=0 modify rp=high
ssacli ctrl slot=0 show

HPE notes that with an online spare, the rebuild starts automatically when a drive fails; without a spare, it starts when the failed drive is replaced. The scripting chapter adds that MediumHigh is only available when Rapid Parity Initialization is enabled. After a replacement, re-run ld all show and pd all show until the logical drive is back to OK. The full replacement procedure is in Replace a failed drive on HPE Smart Array.

Identify drives, rescan and collect diagnostics

ssacli ctrl slot=0 array A modify led=on
ssacli ctrl slot=0 array A modify led=off
ssacli rescan
ssacli ctrl all diag file=/tmp/ssa-diag.zip logs=on

modify led=on flashes the drive LEDs of the target so you can find it; the LEDs stop after an hour or with led=off. rescan detects devices added since the last scan. diag writes a diagnostic report; logs=on adds the controller serial and basecode logs, and ssdrpt=on adds the SSD wear gauge report.

Commands that destroy data

Warning: The commands below delete or rewrite data. Back up first, and check the slot, array and logical drive numbers twice with show config. The forced parameter suppresses the confirmation prompt, so avoid it when typing by hand.

  • ctrl slot=0 ld 2 delete and ctrl slot=0 ld all delete delete logical drives and their data.
  • ctrl slot=0 ld 1 modify raid=5 ss=64 migrates RAID level or strip size; ctrl slot=0 ld 1 modify size=max extends a logical drive. HPE estimates about 15 minutes per gigabyte, with one such task per controller at a time.
  • ctrl slot=0 ld 1 modify reenable forced re-enables a failed logical drive but deletes its data.
  • modify erase on a physical drive erases it; crypto, block and overwrite erases cannot be stopped.

Note: On VMware ESXi, any command that supports forced must include it, otherwise ssacli returns an error. Be extra careful on ESXi hosts.

Frequently asked questions

Does ssacli work with HPE MR controllers?

No. ssacli manages SR controllers. HPE MR controllers are managed with MR Storage Administrator, StorCLI or UEFI System Utilities.

How do I find the right slot number?

Run ssacli ctrl all show. It prints each controller with its slot, for example "in Slot 3", and that is the value for slot=.

Checklist

  • sg driver loaded on RHEL 7.1+ and ssacli runs as root or Administrator.
  • Controller slot and drive IDs taken from ctrl all show config.
  • Logical drives created with create type=ld and verified with ld all show.
  • Spares added and spare activation mode set.
  • Rebuild priority checked with ctrl slot=N show.
  • Backup confirmed before any delete, migrate, re-enable or erase command.

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Servers & Storage for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.