HP 3PAR StoreServ VMware Best Practice part 2

October 17, 2014 0 By Allan Kjaer

I have early blogged about that HP has changed there Best Practice for 3PAR StoreServ, and there i gave the command for changing this on every server https://www.virtual-allan.com/category/hpe/hpe-3par-storeserv, This is nok efficient if you have alot of hosts, so here is the PowerCLI way for changing this on multiple hosts.

If you are not using SIOC, then there som extra host advanced setting that should be set, see the VMware KB: KB1008113 and HP Whitepaper: http://20195.www2.hp.com/v2/getpdf.aspx/4aa4-3286enw.pdf

Connect-VIserver <vcenter server>

foreach($esx in Get-VMHost){
    $esxcli = Get-EsxCli -VMHost $esx
    # Create A new SATP rule for HP 3PAR
    $result = $esxcli.storage.nmp.satp.rule.add($null,"tpgs_on","HP3PAR Custom iSCSI/FC/FCoE ALUA Rule",$null,$null,$null,"VV",$null,"VMW_PSP_RR","iops=1","VMW_SATP_ALUA",$null,$null,"3PARdata")
    Write-Host "Host:", $esx.Name, "Result", $result
}

If you want to se all the 3PAR rules.

Connect-VIserver <vcenter server>

foreach($esx in Get-VMHost){
    $esxcli = Get-EsxCli -VMHost $esx
    Write-Host "Host: " $esx.name
	$esxcli.storage.nmp.satp.rule.list() | where {$_.description -like "*3PAR*"}
}

Setting the Controlling LUN queue depth throttling, in ESXi 5.1 Update 1 and above, if you are not using SIOC (Storage IO Controll):

Connect-VIserver <vcenter server>

foreach($esx in Get-VMHost){
    $result = Get-AdvancedSetting -Entity $esx -Name 'Disk.QFullSampleSize' | Set-AdvancedSetting -Value "32" -Confirm:$false
    Write-Host "Host:", $esx.Name, "Result", $result
    $result = Get-AdvancedSetting -Entity $esx -Name 'Disk.QFullThreshold' | Set-AdvancedSetting -Value "4" -Confirm:$false
    Write-Host "Host:", $esx.Name, "Result", $result
}

NOTE: Do not use this Controlling LUN queue depth throttling configuration, if you have connected different storage systems to the same ESXi hosts, because they might require different settings, then you have to do it per LUN/Devivce.

This sample is not PowerCLI:

esxcli storage core device set --device device_name --queue-full-threshold 4 --queue-full-sample-size 32
Please share this page if you find it usefull: