HPESSA Cli

Installazione

Per installarlo anche su Ubuntu basta usare il programma alien che trasforma i pacchetti RPM in DEB.

Esempio

 alien --to-deb  hepssacli.xxx.rpm

Uso

Il programma ssacli si trova nella cartella /opt e potete usarlo solo come root.

Abbreviazioni

Il programma acceta delle opzioni che potete scrivere nella forma normale o abbreviata. Ecco una lista delle abbreviazioni:

  • chassisname = ch
  • controller = ctrl
  • logicaldrive = ld
  • physicaldrive = pd
  • drivewritecache = dwc
  • licensekey = lk
    1. Specify drives:

- A range of drives (one to three): 1E:1:1-1E:1:3 - Drives that are unassigned: allunassigned

HPE SSACLI – Status

To view the status of the controller, disks or volumes you can run all sorts of commands to get information about what is going on in your VMware ESXi server. The extensive detail is very useful for troubleshooting and gathering information about the system.

  1. Show - Controller Slot 1 Controller configuration basic

./ssacli ctrl slot=1 show config

  1. Show - Controller Slot 1 Controller configuration detailed

./ssacli ctrl slot=1 show detail

  1. Show - Controller Slot 1 full configuration

./ssacli ctrl slot=1 show config detail

  1. Show - Controller Slot 1 Status

./ssacli ctrl slot=1 show status

  1. Show - All Controllers Configuration

./ssacli ctrl all show config

  1. Show - Controller slot 1 logical drive 1 status

./ssacli ctrl slot=1 ld 1 show status

  1. Show - Physical Disks status basic

./ssacli ctrl slot=1 pd all show status

  1. Show - Physical Disk status detailed

./ssacli ctrl slot=1 pd all show status

  1. Show - Logical Disk status basic

./ssacli ctrl slot=1 ld all show status

  1. Show - Logical Disk status detailed

./ssacli ctrl slot=1 ld all show detail

HPE SSACLI – Creating

Creating a new logical drive can be done online with the HPE Smart Array controllers. I have displayed some basic examples.

  1. Create - New single disk volume

./ssacli ctrl slot=1 create type=ld drives=2I:0:8 raid=0 forced

  1. Create - New spare disk (two defined)

./ssacli ctrl slot=1 array all add spares=2I:1:6,2I:1:7

  1. Create - New RAID 1 volume

./ssacli ctrl slot=1 create type=ld drives=1I:0:1,1I:0:2 raid=1 forced

  1. Create - New RAID 5 volume

./ssacli ctrl slot=1 create type=ld drives=1I:0:1,1I:0:2,1I:0:3 raid=5 forced

HPE SSACLI – Adding drives to logical drive

Adding drives to an already created logical drive is possible with the following commands. You need to perform two actions: adding the drive(s) and expanding the logical drive. Keep in mind: make a backup before performing the procedure.

  1. Add - All unassigned drives to logical drive 1

./ssacli ctrl slot=1 ld 1 add drives=allunassigned

  1. Modify - Extend logical drive 2 size to maximum (must be run with the "forced" flag)

./ssacli ctrl slot=1 ld 2 modify size=max forced

HPE SSACLI – Rescan controller

To issue a controller rescan, you can run the following command. This can be interesting for when you add new drives in hot swap bays.

  1. Rescan all controllers

./ssacli rescan

HPE SSACLI – Drive Led Status

The LED status of the drives can also be controlled by the ssacli utility. An example is displayed below how to enable and disable a LED.

  1. Led - Activate LEDs on logical drive 2 disks

./ssacli ctrl slot=1 ld 2 modify led=on

  1. Led - Deactivate LEDs on logical drive 2 disks

./ssacli ctrl slot=1 ld 2 modify led=off

  1. Led - Activate LED on physical drive

./ssacli ctrl slot=0 pd 1I:0:1 modify led=on

  1. Led - Deactivate LED on physical drive

./ssacli ctrl slot=0 pd 1I:0:1 modify led=off

HPE SSACLI – Modify Cache Ratio

Modify the cache ratio on a running system can be interesting for troubleshooting and performance beanchmarking.

  1. Show - Cache Ratio Status

./ssacli ctrl slot=1 modify cacheratio=?

  1. Modify - Cache Ratio read: 25% / write: 75%

./ssacli ctrl slot=1 modify cacheratio=25/75

  1. Modify - Cache Ratio read: 50% / write: 50%

./ssacli ctrl slot=1 modify cacheratio=50/50

  1. Modify - Cache Ratio read: 0% / Write: 100%

./ssacli ctrl slot=1 modify cacheratio=0/100

HPE SSACLI – Modify Write Cache

Changing the write cache settings on the storage controller can be done with the following commands:

  1. Show - Write Cache Status

./ssacli ctrl slot=1 modify dwc=?

  1. Modify - Enable Write Cache on controller

./ssacli ctrl slot=1 modify dwc=enable forced

  1. Modify - Disable Write Cache on controller

./ssacli ctrl slot=1 modify dwc=disable forced

  1. Show - Write Cache Logicaldrive Status

./ssacli ctrl slot=1 logicaldrive 1 modify aa=?

  1. Modify - Enable Write Cache on Logicaldrive 1

./ssacli ctrl slot=1 logicaldrive 1 modify aa=enable

  1. Modify - Disable Write Cache on Logicaldrive 1

./ssacli ctrl slot=1 logicaldrive 1 modify aa=disable

HPE SSACLI – Modify Rebuild Priority

Viewing or changing the rebuild priority can be done on the fly. Even when the rebuild is already active. Used it myself a couple of times to lower the impact on production.

  1. Show - Rebuild Priority Status

./ssacli ctrl slot=1 modify rp=?

  1. Modify - Set rebuildpriority to Low

./ssacli ctrl slot=1 modify rebuildpriority=low

  1. Modify - Set rebuildpriority to Medium

./ssacli ctrl slot=1 modify rebuildpriority=medium

  1. Modify - Set rebuildpriority to High

./ssacli ctrl slot=1 modify rebuildpriority=high

HPE SSACLI – Modify SSD Smart Path

You can modify the HPE SDD Smart Path feature by disabling or enabling. To make clear what the HPE SDD Smart Path includes, here is a official statement by HPE:

“HP SmartCache feature is a controller-based read and write caching solution that caches the most frequently accessed data (“hot” data) onto lower latency SSDs to dynamically accelerate application workloads. This can be implemented on direct-attached storage and SAN storage.”

For example, when running VMware vSAN SSD Smart Path must be disabled for better performance. In some cases worse the entire vSAN disk group fails.

  1. Note: This command requires the array naming type like A/B/C/D/E
  2. Modify - Enable SSD Smart Path

./ssacli ctrl slot=1 array a modify ssdsmartpath=enable

  1. Modify - Disable SSD Smart Path

./ssacli ctrl slot=1 array a modify ssdsmartpath=disable

HPE SSACLI – Delete Logical Drive

Deleting a logical drive on the HPE Smart Array controller can be done with the following commands.

  1. Delete - Logical Drive 1

./ssacli ctrl slot=1 ld 1 delete

  1. Delete - Logical Drive 2

./ssacli ctrl slot=1 ld 2 delete

HPE SSACLI – Erasing Physical Drives

In some cases, you need to erase a physical drive. This can be performed with multiple erasing options. Also, you can stop the process.

Erase patterns available:

    Default
    Zero
    Random_zero
    Random_random_zero
  1. Erase physical drive with default erasepattern

./ssacli ctrl slot=1 pd 2I:1:1 modify erase

  1. Erase physical drive with zero erasepattern

./ssacli ctrl slot=1 pd 2I:1:1 modify erase erasepattern=zero

  1. Erase physical drive with random zero erasepattern

./ssacli ctrl slot=1 pd 1E:1:1-1E:1:3 modify erase erasepattern=random_zero

  1. Erase physical drive with random random zero erasepattern

./ssacli ctrl slot=1 pd 1E:1:1-1E:1:3 modify erase erasepattern=random_random_zero

  1. Stop the erasing process on phsyical drive 1E:1:1

./ssacli ctrl slot=1 pd 1E:1:1 modify stoperase

HPE SSACLI – License key

In some cases a licence key needs to be installed on the SmartArray storage controller to enable the advanced features. This can be done with the following command:

  1. License key installation

./ssacli ctrl slot=1 licensekey XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

  1. License key removal

./ssacli ctrl slot=5 lk XXXXXXXXXXXXXXXXXXXXXXXXX delete