Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omerkarabacak/41daae773b820992a525b69102b7c6cd to your computer and use it in GitHub Desktop.
Save omerkarabacak/41daae773b820992a525b69102b7c6cd to your computer and use it in GitHub Desktop.

Revisions

  1. @si458 si458 revised this gist Dec 9, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions PVE-HP-ssacli-smart-storage-admin.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # HP Smart Storage Admin CLI (`ssacli`) installation and usage on Proxmox PVE (6.x OR 7.x)
    # HP Smart Storage Admin CLI (`ssacli`) installation and usage on Proxmox PVE (7.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.
    @@ -13,7 +13,7 @@ Installation process of the `ssacli` package on Proxmox is the same as on any o
    ### 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 buster/current non-free" > /etc/apt/sources.list.d/hp-mcp.list
    echo "deb http://downloads.linux.hpe.com/SDR/repo/mcp bullseye/current non-free" > /etc/apt/sources.list.d/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:
  2. @si458 si458 revised this gist Sep 24, 2021. No changes.
  3. @si458 si458 revised this gist Sep 24, 2021. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions PVE-HP-ssacli-smart-storage-admin.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # 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 OR 7.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.
    @@ -10,12 +10,10 @@ CLI is not as convenient as GUI interface provided by BIOS or desktop utilities,
    ## 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
    echo "deb http://downloads.linux.hpe.com/SDR/repo/mcp buster/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:
  4. @Philhil Philhil revised this gist May 15, 2020. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions PVE-HP-ssacli-smart-storage-admin.md
    Original file line number Diff line number Diff line change
    @@ -74,8 +74,6 @@ Here are few examples of `ssacli` commands that you can use to diagnose and man

    **Controller Mode RAID/HBA**

    ssacli ctrl all show config

    For Smart-array controller starting with P, e.g. P420i:

    ssacli controller slot=0 modify hbamode=on
  5. @Philhil Philhil revised this gist May 15, 2020. 1 changed file with 12 additions and 3 deletions.
    15 changes: 12 additions & 3 deletions PVE-HP-ssacli-smart-storage-admin.md
    Original file line number Diff line number Diff line change
    @@ -70,10 +70,19 @@ Here are few examples of `ssacli` commands that you can use to diagnose and man
    **Show controllers configuration**

    ssacli ctrl all show config
    ** Controller Mode RAID/HBA


    **Controller Mode RAID/HBA**

    ssacli ctrl all show config

    For Smart-array controller starting with P, e.g. P420i:

    ssacli controller slot=0 modify hbamode=on

    For HBAs starting with H, e.g. H240:

    For Smart-array controller starting with P, e.g. P420i: ssacli controller slot=0 modify hbamode=on
    For HBAs starting with H, e.g. H240: ssacli controller slot=0 modify raidmode=off
    ssacli controller slot=0 modify raidmode=off

    **Rescan for new devices**
    Useful after swapping disks in bays, etc...
  6. @Philhil Philhil revised this gist May 15, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions PVE-HP-ssacli-smart-storage-admin.md
    Original file line number Diff line number Diff line change
    @@ -70,6 +70,10 @@ Here are few examples of `ssacli` commands that you can use to diagnose and man
    **Show controllers configuration**

    ssacli ctrl all show config
    ** Controller Mode RAID/HBA

    For Smart-array controller starting with P, e.g. P420i: ssacli controller slot=0 modify hbamode=on
    For HBAs starting with H, e.g. H240: ssacli controller slot=0 modify raidmode=off

    **Rescan for new devices**
    Useful after swapping disks in bays, etc...
  7. @mrpeardotnet mrpeardotnet created this gist Nov 25, 2019.
    202 changes: 202 additions & 0 deletions PVE-HP-ssacli-smart-storage-admin.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,202 @@
    # 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