Wednesday, September 21, 2016

Create SATP Rules + Host Profiles + 3PAR PURE

# esxcli storage nmp satp rule add -s "VMW_SATP_ALUA" -P "VMW_PSP_RR" -O iops=1 -c "tpgs_on" -V "3PARdata" -M "VV" -e "HP 3PAR Custom iSCSI/FC/FCoE ALUA Rule"
For host persona 6 the following command would be run.
# esxcli storage nmp satp rule add -s "VMW_SATP_DEFAULT_AA" -P "VMW_PSP_RR" -O iops=1 -c "tpgs_off" -V "3PARdata" -M "VV" -e "HP 3PAR Custom iSCSI/FC/FCoE ALUA Rule"
The difference between the rules is that host persona 11 is ALUA, where as host persona 6 is Active/Active. This post explains ALUA in further detail.
Logging into each ESXi host to create the rule does not seem like a good use of time, so I went looking for some better ways of creating these rules with out having to do it manually. There are multiple ways of adding these rules including Host ProfilesPowerClivCLI
I went searching around for a solution for PowerCli and found this article, it talks about the best practices on the 3PAR and adds some PowerCli scripts to configure these for the 3PAR. Unfortunately the article gives a PowerCli Script that changes the properties on each LUN instead of adding the SATP rule to the ESXi host. While this will work for the existing LUNs, we want it to be the default on all new LUNs as well, so we want a global change rather than a LUN specific change. So I did a little digging into the PowerCli Get-Esxcli command and found thesyntax for the commandThis article gives some example PowerCli scripts using Get-Esxcli. Unfortunately I did not find an example with the syntax for the command that I wanted, so I went to the command line and queried the Get-Esxcli command for the esxcli storage nmp satp rule add command. We can see the options below.
boolean add(boolean boot, string claimoption, string description, string device, string driver, boolean force, string model, string option, string psp, string pspoption, string satp, string transport, string type, string vendor)
So we need to fill in the appropriate values for our SATP rule and send in $null for the options we want to omit. I came up with the following command to add the rule as per the best practices.
PowerCLI C:\> $esxcli.storage.nmp.satp.rule.add($null,"tpgs_on","HP 3PAR Custom iSCSI/FC/FCoE ALUA Rule",$null,$null,$null,"VV",$null,"VMW_PSP_RR","iops=1","VMW_SATP_ALUA",$null,$null,"3PARdata")
true
As you can see in the example above, it returned true when I ran the command. I do not really trust this, so I need to confirm that the rule actually exists. Let’s verify that the rule was put in place. The command below will look for any SATP rules that have 3PAR in the description.
PowerCLI C:\> $esxcli.storage.nmp.satp.rule.list() | where {$_.description -like "*3par*"}


ClaimOptions : tpgs_on
DefaultPSP   : VMW_PSP_RR
Description  : HP 3PAR Custom iSCSI/FC/FCoE ALUA Rule
Device       :
Driver       :
Model        : VV
Name         : VMW_SATP_ALUA
Options      :
PSPOptions   : iops=1
RuleGroup    : user
Transport    :
Vendor       : 3PARdata

No comments:

Post a Comment

Vmware NSX SSL creation 

Using OpenSSL for NSX Manager SSL import: Creates CSR and 4096 bit KEY Creating NSX 6.4.2 SSL    openssl req -out nsxcert.csr -newkey rsa:40...