Create PSP rule for HPE 3PAR

There are a few best practices when implementing a 3PAR into a vSphere environment. One of these is the creation of a custom PSP-rule. With this set, all 3PAR volumes are automatically configured according to best practices when they get mounted. In this post I will show ways to create this rule.

These are the arguments you need to create the rule:

  • Storage Array Type Plug-in (SATP): VMW_SATP_ALUA
  • Path Selection Policy (PSP): VMW_PSP_RR
  • IOps based PSP-Option: iops=1
  • Claiming option: tpgs_on
  • Vendor: 3PARdata
  • Model: VV
  • Description

The classic way is by using esxcli in ESXi. You can use direct console, SSH or vMA to run esxcli.

  • Create rule
    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 Rule"
  • The check rule after creation, run
    esxcli storage nmp satp rule list | grep "3PARdata

An other way is to use PowerCLI. With PowerCLI you can use get-esxcli to do the job. Cmdlet get-esxcli is available in two versions (V1 and V2 since vSphere 5.0). When using V1, arguments are recognized by location in the command. With V2 arguments are named (as hashtable).

Use these commands to use V1:

  • Create esxcli-Instance
    $esxcli = Get-VMHost | Get-EsxCli
  • Check rule | where {$_.vendor -eq "3PARdata"}
  • Create rule
    $$null, "tpgs_on", "HP 3PAR Custom Rule", $null, $null, $null, "VV", "iops=1", "VMW_PSP_RR", $null, "VMW_SATP_ALUA", $null, $null, "3PARdata")
  • If you have to remove the rule, run:
    $$null, "tpgs_on", "HP 3PAR Custom Rule", $null, $null, "VV", "iops=1", "VMW_PSP_RR", $null, "VMW_SATP_ALU
    A", $null, $null, "3PARdata")

Use these commands to use V2:

  • Create esxcli-Instance
    $esxcli2 = Get-VMHost | Get-EsxCli -v2
  • Create the list of available arguments for the command you need. Adding a rule is just an example for this workflow.
    $rule_args = $
  • Fill the values
    $rule_args.description="HP 3PAR Custom Rule"
  • Create rule
  • Alternatively you can shorten to just this command
    ${"satp"="VMW_SATP_ALUA"; "vendor"="3PARdata"; "psp"="VMW_PSP_RR"; "model"="VV"; "pspoption"="iops=1"; "description"="HP 3PAR Custom Rule"; "claimoption"="tpgs_on"})
  • If you have to remove the rule, run:
  • Check if rule exists
    $ | where {$_.vendor -eq "3PARdata"}

One thought on “Create PSP rule for HPE 3PAR

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s