HP Smart Array CLI commands on ESXi

Show configuration
/opt/hp/hpssacli/bin/hpssacli ctrl all show config

Controller status
/opt/hp/hpssacli/bin/hpssacli ctrl all show status

Show detailed controller information for all controllers
/opt/hp/hpssacli/bin/hpssacli ctrl all show detail

Show detailed controller information for controller in slot 0
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 show detail

Rescan for New Devices
/opt/hp/hpssacli/bin/hpssacli rescan

Physical disk status
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd all show status

Show detailed physical disk information
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd all show detail

Logical disk status
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld all show status

View Detailed Logical Drive Status
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 show

Create New RAID 0 Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld drives=1I:1:2 raid=0

Create New RAID 1 Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=1

Create New RAID 5 Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2,2I:1:6,2I:1:7,2I:1:8 raid=5

Delete Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 delete

Add New Physical Drive to Logical Volume
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 add drives=2I:1:6,2I:1:7

Add Spare Disks
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array all add spares=2I:1:6,2I:1:7

Enable Drive Write Cache
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify dwc=enable

Disable Drive Write Cache
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify dwc=disable

Erase Physical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd 2I:1:6 modify erase

Turn on Blink Physical Disk LED
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 modify led=on

Turn off Blink Physical Disk LED
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 modify led=off

Modify smart array cache read and write ratio (cacheratio=readratio/writeratio)
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify cacheratio=100/0

Enable smart array write cache when no battery is present (No-Battery Write Cache option)
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify nbwc=enable

Disable smart array cache for certain Logical Volume
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 logicaldrive 1 modify arrayaccelerator=disable

Enable smart array cache for certain Logical Volume
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 logicaldrive 1 modify arrayaccelerator=enable

Enable SSD Smart Path
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array a modify ssdsmartpath=enable

Disable SSD Smart Path
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array a modify ssdsmartpath=disable

33 thoughts on “HP Smart Array CLI commands on ESXi

  1. Very conscience, the HP guide is too verbose. Your page had just what I needed: practical examples. good job.

  2. Is there any way to set the friendly name of the Array when creating it, which the PS cmdlet get-disk lists when executed? I would like to automate the entire server deployment process including the creating and partitioning of multiple Arrays and Need some way to identify each Array in order to get the disk index for formatting.

  3. Pingback: HP SMART ARRAY CLI COMMANDS ON ESXI | Quelques liens utiles … ;)
  4. Are you aware of any commands that interact with HP SmartCache? I was looking around through HP documentation and haven’t found anything on displaying SmartCache stats or even creating a SmartCache LV. It appears to be restricted to GUI only which doesn’t bode well for vSphere implementations.

    • I was actually able to figure it out. Below are the commands that I used (!!!!Change ctrl and ld to fit your environment!!!!)….

      /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array b ld 2 show detail (Used this to show SmartCache config)
      /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array b ld 2 modify writepolicy=writethrough (Change write policy on SmartCache which is useful for instance when you need to delete the SmartCache to expand an array)
      /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 delete (Deletes the SmartCache)
      /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ldcache drives=1e:1:10 datald=1 (Creates the SmartCache)

      I would encourage referencing the following manual http://www.hp.com/ctg/Manual/c03909334

  5. Pingback: ESXi – Add disk and convert your Raid0 to Raid1 on HP Proliant Gen9: | vm-blog.info
  6. Any one know if this utility can expand the logical drive after adding physical disks and after the transforming has taken place. Because, the drive does not show the expected new size until the drive is expanded. You can do the expand from the BIOS > HPSSA. Be nice to do it online.

  7. Be careful, with ESXi 6.5, HPE has change the name of vib package from “hpssacli” (eg hpssacli-2.30.6.0-6.0.0) to “ssacli” (eg. ssacli-2.65.2.0-6.5.0).

    [root@ESXi01:~] esxcli software vib list | grep ss
    ssacli 2.65.2.0-6.5.0.4240417 HPE PartnerSupported 2016-12-01

    So you’ll have to use the same command listed above but the following path “/opt/smartstorageadmin/ssacli/bin/” (eg. /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=1 pd All show).

    Moreover, if you made a proper migration from ESXi 6.0 to 6.5 using HPE Custom ISO, you’ll still have the hpssssacli installed but you’ll receive an error trying to use it.

      • Just an fyi, in ESXi 6.0 u2, both paths are available:

        [root@esx105:~] /opt/hp/hpssacli/bin/hpssacli
        hpssacli hpssacli_esx
        [root@esx105:~] /opt/smartstorageadmin/ssacli/bin/ssacli
        ssacli ssacli_esx ssacli_ret

        (showing tab completion)

  8. Just to add. For me on ESXi 6.0 does commands not working straightaway. You need to put in proper sentence and needs to be enclosed in quotes.
    esxcli hpssacli cmd -q “ctrl all show”

  9. Many thanks for you post and useful examples. I’m using P410i on a whitebox server at home and hpacucli is not woriking anymore on the latest version of esx 5.5. Due to the fact that is not HP Server , I don’t have any other access to the settings of the controller, only if I install windows server 2008 on separate HDD and boot from it with HP SA Config tools.

    Thanks again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s