Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

Installation process of the ssacli package on Proxmox is the same as on any other Debian based system.

NOTE: HP does not provide Buster repository for Debian 10/Proxmox 6.x, but we can still use Stretch repository even that it's targeted for Debian 9/Proxmox 5.x.

Add HP's MCP repository

To add HP's MCP repository to apt sources list use this command:

echo "deb http://downloads.linux.hpe.com/SDR/repo/mcp stretch/current non-free" > /etc/apt/sources.list.d/hp-mcp.list

Download and add public keys for the MCP repository

Public keys are needed by apt to verify repository signatures, so we need to download and add them. There are four of them and we need to download and them all:

wget -q -O - http://downloads.linux.hpe.com/SDR/hpPublicKey1024.pub | apt-key add -
wget -q -O - http://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub | apt-key add -
wget -q -O - http://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub | apt-key add -
wget -q -O - http://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | apt-key add -

Installing the ssacli package

First, we need to update available packages:

apt update

And then we can install the ssacli package:

apt install ssacli

Using the ssacli tool

Command short and long names 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. Here is a list of all commands and their 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

Command examples

Here are few examples of ssacli commands that you can use to diagnose and manage your HP Smart Storage Controller.

Show available controllers

ssacli ctrl all show

Show controllers status

ssacli ctrl all show status

Show detailed controllers information

ssacli ctrl all show detail

Show controllers configuration

ssacli ctrl all show config

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

ssacli rescan

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

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

Show all physical disks detailed information (controller slot 0)

ssacli ctrl slot=0 pd all show detail

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

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

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

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

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

Show array information (controller slot 0, array A)

ssacli ctrl slot=0 array a show

Show array status (controller slot 0, all arrays)

ssacli ctrl slot=0 array all show status

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

ssacli 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)

ssacli 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)

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

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

ssacli 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)

ssacli 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)

ssacli 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)

ssacli 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)

ssacli ctrl slot=0 ld 1 modify led=on
ssacli 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)

ssacli ctrl slot=0 pd 1I:1:1 modify led=on
ssacli 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)

ssacli ctrl slot=0 modify cacheratio=80/20

Show physical drive write cache status (controller slot 0)

ssacli 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.

ssacli ctrl slot=0 modify dwc=enable
ssacli 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)

ssacli ctrl slot=0 modify nbwc=?

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

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

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

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

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

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

Show spare activation mode

ssacli ctrl slot=0 modify spareactivationmode=?

Set spare activation mode

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

Show rebuild priority

ssacli ctrl slot=0 modify rp=?

Modify rebuild priority

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

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

ssacli ctrl slot=0 pd 1I:1:1 modify erase
@jlmorgado
Copy link

Hi! Thanks for this. Have you tried installing the hpasmcli tools? Can't do it in Debian

@simion-chis
Copy link

simion-chis commented Jul 7, 2020

It's working for me on Ubuntu server 18.04
Thank you!

$ sudo ssacli ctrl all show status

Smart Array P420 in Slot 1
   Controller Status: OK
   Cache Status: OK
   Battery/Capacitor Status: OK

@hsafe
Copy link

hsafe commented Jul 14, 2020

Excellent! have been in the thought of it for CentOS...might steal a bit of yours ;)

@mrpeardotnet
Copy link
Author

Hi! Thanks for this. Have you tried installing the hpasmcli tools? Can't do it in Debian

Proxmox is Debian based, so that is quite strange that you have troubles installing it on this distro...

@sparse91
Copy link

Buster is added.

@positivedefinite
Copy link

Worked for me on Ubuntu Server 20.04.1 LTS with Smart Array P400i in Slot 0 (embedded) holding 4x HP 146GB 3.5" 10k on RAID 1+0

Thank you for making this readme, much appreciated 👍

@thejockel
Copy link

Thanks for this awesome markdown.
Helped me a lot. 👍

@wiedal
Copy link

wiedal commented Dec 21, 2020

Yeah, very good documentation.
I did this on Proxmox 6.3, it's working.
Thank You very much.

@cremofix
Copy link

has someone an idea which configuration i need to have just 4 independent disks, each in one bay, no raid
I do not want to use the raid controller and instead use software raid.
Thanks?

@positivedefinite
Copy link

has someone an idea which configuration i need to have just 4 independent disks, each in one bay, no raid
I do not want to use the raid controller and instead use software raid.
Thanks?

You need to create 4 separate logical drives, each with one physical drive. You can do this either from CLI or using ORCA utility on Boot.

CLI:

First make sure that physical drives that you will use are not assigned to any logical drives, then this might work:

ssacli ctrl slot=0 create type=ld drives=1I:1:1 raid=0
ssacli ctrl slot=0 create type=ld drives=1I:1:2 raid=0
ssacli ctrl slot=0 create type=ld drives=2I:1:5 raid=0
ssacli ctrl slot=0 create type=ld drives=2I:1:6 raid=0

ORCA:

F6 if I remember correctly, but check with your BIOS, it was quite a hassle for me to find the right key & moment to access ORCA but it as far as I know every HP Smart Array should make it possible to configure from ORCA. But once you are in, it is even easier than from CLI, so I recommend to take this route.

Good luck :)

@borisovewgeniy
Copy link

root@pve2:~# ssacli ctrl slot=3 modify spareactivationmode=?

Error: This operation is not supported with the current configuration. Use the
"show" command on devices to show additional details about the
configuration.
Reason: Not supported

@karma-git
Copy link

karma-git commented Jun 7, 2021

Hi there, could anyone help me understand how to execute this command (reenablecache)?
Thanks.

$ sudo ssacli ctrl all show config detail
Smart Array P840ar in Slot 0 (Embedded)
A cache backup failure has occurred. Please execute the "reenablecache" command
to enable the cache. Your controller may require a reboot after the operation
to complete the cache recovery process.

@borisovewgeniy
Copy link

Привет, может ли кто-нибудь помочь мне понять, как выполнить эту команду (reenablecache)?
Спасибо.

$ sudo ssacli ctrl all show config detail
Smart Array P840ar in Slot 0 (Embedded)
A cache backup failure has occurred. Please execute the "reenablecache" command
to enable the cache. Your controller may require a reboot after the operation
to complete the cache recovery process.

Попробуй выполнить рад команд по активации деактивации кеша.
Показать состояние кэша записи физического диска (слот контроллера 0)

ssacli ctrl slot=0 modify dwc=?
Включение / отключение кэша записи на физический диск (слот контроллера 0) Важно: поскольку кэш записи на физический диск не имеет батарейного питания, вы можете потерять данные, если произойдет сбой питания во время процесса записи. Чтобы свести к минимуму эту возможность, используйте резервный источник питания.

ssacli ctrl slot=0 modify dwc=enable
ssacli ctrl slot=0 modify dwc=disable
Отображение состояния кеша записи интеллектуального массива при отсутствии батареи (опция кеширования записи без батареи, слот контроллера 0)

ssacli ctrl slot=0 modify nbwc=?
Включение / отключение кеша записи интеллектуального массива при отсутствии батареи (опция кеширования записи без батареи, слот контроллера 0)

ssacli ctrl slot=0 modify nbwc=enable
ssacli ctrl slot=0 modify nbwc=disable
Включение / отключение кеширования интеллектуального массива для определенного логического тома (слот контроллера 0, логический диск 1)

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

@mkaatman
Copy link

What package can monitor the array health and send email as issues occur?

@Walkabout63
Copy link

Hi ALL,

just wanted to know if anyone had tried ... or something similar was available for for running on Proxmox v7(Bullseye)

@tkriviradev
Copy link

tkriviradev commented Aug 11, 2021 via email

@Walkabout63
Copy link

Hi ALL, FYI

found this: http://downloads.linux.hpe.com/SDR/repo/mcp/Debian/pool/non-free/

this has different versions for ssacli command as deb packages

tried version 4.17-6.0

on Proxmox version: pve-manager/7.0-10/d2f465d3 (running kernel: 5.11.22-2-pve)

this worked fine for me ....

@shalak
Copy link

shalak commented Sep 14, 2021

Is it safe to use ssacli with P420i when I have Proxmox installed on one of the volumes this controller creates?

@si458
Copy link

si458 commented Sep 24, 2021

Is it safe to use ssacli with P420i when I have Proxmox installed on one of the volumes this controller creates?

yes it works here a treat and very helpful!

Hi ALL, FYI

found this: http://downloads.linux.hpe.com/SDR/repo/mcp/Debian/pool/non-free/

this has different versions for ssacli command as deb packages

tried version 4.17-6.0

on Proxmox version: pve-manager/7.0-10/d2f465d3 (running kernel: 5.11.22-2-pve)

this worked fine for me ....

if you follow the steps above and change stretch to buster, that also installs the latest version (5.10-44.0) 👍

MY UPDATED GIST VERSION: https://gist.github.com/si458/2fc70d5c807697537be6264025c3b554

@futureweb
Copy link

Hey there,
is it somehow possible to read the current Status of the Drive LED - if it's ON or OFF?
thx

@professorcheechi
Copy link

professorcheechi commented Oct 7, 2022

I found this a very helpful markdown, however 22.04 LTS (in my case Pop!_OS but based on ubuntu) has deprecated the portion with installation instructions above;
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

in case it is helpful to anyone I have written an installer script as i have a few more systems to get to later that also need updating or controllers installed. (I use zsh but you may prefer to edit to bash or other as needed)
https://github.com/professorcheechi/installssa/

on my Prox 7.1 I used alien with the rpm to install ssacli, but i wanted an automated solution.

@lethargosapatheia
Copy link

Hello. Does any know how I can get the disk i/o counters from the controller? I'm guessing ssacli is mostly used to manage the controller, not to get counters/metrics.

@iqbal05eee
Copy link

how to check raid in Linux Debian 10? In centos, we would use hpacucli which doesn't work in debian. Any idea how to use in Debian?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment