Thursday, September 29, 2016

PowerCli script to RR IOPS 3PAR + set naa. LUNs to RR

#Connect-VIServer -Server P111vc01.st.com

$esxcli = Get-EsxCli

Get-VMHost btpesxu4c1b6.st.com| Get-ScsiLun -CanonicalName "naa.500*" | Set-ScsiLun -MultipathPolicy "roundrobin"

Get-VMHost btpesxu4c1b6.st.com| Get-ScsiLun -CanonicalName "naa.60002ac0000000000000003400006056*" | Set-ScsiLun -MultipathPolicy "roundrobin"

#esxcli storage nmp satp rule add -s "VMW_SATP_ALUA" -P "VMW_PSP_RR" -O iops=100 -c "tpgs_on" -V "3PARdata" -M "VV" -e "HP 3PAR Custom iSCSI/FC/FCoE ALUA Rule"

$esxcli.storage.nmp.device.list() | where {$_.device -like "naa.500*"} | %{

  $configBefore = $esxcli.storage.nmp.psp.roundrobin.deviceconfig.get($_.device)

  $esxcli.storage.nmp.psp.roundrobin.deviceconfig.set(0, 1, $_.device, [long]100, "iops", $false)

  $configAfter = $esxcli.storage.nmp.psp.roundrobin.deviceconfig.get($_.device)

  # Uncomment the following lines if you want to report the settings

   $configBefore

   $configAfter

}

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