ssacli cheatsheet
May 28, 2022
- Setup tools and kernel modules
- Common usage
- Gather informations
- Setup RAID 0
- Add new disks to existing RAID
- Check disks status
- Enable/Disable led blinking
- References
Here is a small cheatsheet to configure HP Smart Array controllers from the Operating system's command-line.
Setup tools and kernel modules
Install HPE Smart Storage Administrator CLI tools on the host server:
$ sudo emerge --ask hpssacli
Ensure Smart Array Controller kernel module is properly load:
$ sudo modprobe hpsa
$ echo hpsa > /etc/modules-load.d/hp.conf
Common usage
Gather informations
Controller informations
Retrieve controller(s) informations:
$ ssacli ctrl slot=0 show detail
List available disks
In my case, 2 SSD in the two first slot, one HDD on the third one:
$ ssacli ctrl slot=0 physicaldrive all show
Controller: Smart Array P420i in Embedded Slot has an unsupported configuration.
Smart Array P420i in Slot 0 (Embedded)
Unassigned
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA SSD, 240 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA SSD, 240 GB, OK)
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA HDD, 1 TB, OK)
List RAID configurations
$ ssacli ctrl all show config
Internal Drive Cage at Port 1I, Box 1, OK
Internal Drive Cage at Port 2I, Box 0, OK
Port Name: 1I
Port Name: 2I
Unassigned
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA SSD, 240 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA SSD, 240 GB, OK)
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA HDD, 1 TB, OK)
Setup RAID 0
List avaible disks for RAID
$ ssacli ctrl all show config | grep physicaldrive
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA SSD, 240 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA SSD, 240 GB, OK)
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA HDD, 1 TB, OK)
Create a RAID0 with the two SSD:
$ ssacli ctrl slot=1 create type=ld drives=1I:1:3 raid=0
Create RAID0 with only one HDD:
$ ssacli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=0
Once raid device created, It should appear under block device tree
Add new disks to existing RAID
Locate the free disk, then add his id as follow
$ ssacli ctrl slot=2 array A add drives=2x:x:x,2x:x:x
$ ssacli rescan
Once done, you can grow your logical drive or create a new logic drive with the free space.
Check disks status
$ hpssacli ctrl slot=0 ld all show status
Enable/Disable led blinking
$ ssacli ctrl slot=0 ld 2 modify led=on