Below are the most common HPSSACLI commands you will need to configure an HP SmartArray controller.  This utility replaces the older HPACUCLI.

NOTE! You may need to change "slot=0" to match your hardware installation.

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
/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

the drives= command expects you to know the Port, Box, and Bay location.  You can grab that information using the /opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd all show detail command.  You will look for the following:



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

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 Cache
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify dwc=enable

In some cases you may have to add the "forced" option to the end of the command above.  See below:

/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify dwc=enable forced

Modify Cache Ratio
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify cr=50/50

Disable 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

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

When trying to addDisk/LUN storage to an ESXi host you receive the error below:

Call "HostDatastoreSystem.QueryVmfsDatastoreCreateOptions" for object "ha-datastoresystem" on ESXi failed.

To fix this issue login to ESXi Shell and list your local disk using the following command:

/dev/disks/ ls"

you should see a long list of device names. You are looking for something similar to "naa.600508b1001c9836a9ae20949c02e52f"

you can also use Configuration/Storage Adapters from the vSphere Client to help narrow your search down.  See image below:

and run the following command:

partedUtil mklabel /dev/disks/naa.600508b1001c9836a9ae20949c02e52f msdos

 

Using tools like tcpdump are very useful when troubleshooting not only network problems but applications as well.  For windows systems I've always used Wireshark and tcpdump is great choice for most *Nix distros and even appliances like Load Balancers.

VMware ESXi 5.5 has introduced a new feature for capturing packets called pktcap-uw.  It will allow you to capture packets for vmkernel ports, physical vmnic interfaces and even traffic of specific VM running on the host.  You can learn more about it here: 

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2051814

But for this article I will show you how to do a capture for a specific VM.  The first thing you will need to do is enable SSH & ESXCLI on your host.  This will allow you to SSH to the host.  If you have console access you can also gain access to the shell by using ALT-F1 after enabling troubleshooting mode.

Once you have logged on via SSH or console you first need to figure out the port # in use by the VM.  You do this by using the ESXTOP utility and pressing "N" for network.  This will list all VM's and the port in use.  See image below:

Another way to find the PORT-ID of a VM is to use the following commands:

esxcli network vm list | grep -i VMNAME

esxcli network vm port list -w WORLDIDNUM

I'm going to capture traffic for the server named "util".  The port number I need to use in my capture statement will be "50331656".  I exit the screen above by hitting "q".  The command to capture traffic for the Util server is below:

pktcap-uw --switchport 50331656 -o /vmfs/volumes/DAS-PROD/util/capture1.pcap

The command above will capture ALL traffic.  You can narrow down your capture by using filters like destination/source port, ip or protocol type.  The command below shows the same capture but this time filtering for protocol TCP only.

pktcap-uw --switchport 50331656 --proto 0x06 -o /vmfs/volumes/DAS-PROD/util/capture1.pcap

Notice that we are using Hex for proto.  You can find the complete list of protocols in Hex here:

http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers

You quit your capture by hitting CTRL+C.  You can then grab your PCAP file by browsing the datastore where you save the file and open it up with Wireshark.

You can also verify that there are no active captures using the following command and kill any found with the "kill" command:

lsof | grep pktcap-uw | awk '{print $1}' | sort -u

kill $(lsof | grep pktcap-uw | awk '{print $1}' | sort -u