VMware Cloud Community
andysza01
Contributor
Contributor

How to change an iSCSI LUN SATP Configuration

Guys,

I am looking for a CLI on ESX5.1 that can be used for changing the SATP configuration (on the fly) of an ISCSI LUN. I need to do a tests and would like to change a single iSCSI LUN from VMW_SATP_ALUA to VMW_SATP_DEFAULT_AA SATP policy.

I have already tried to delete the VMW_SATP_ALUA policy and also to create a rule (filter) using a specific name storage array device/vendor/model but it has not been working. After ESXi hosts reboots the it bring the VMW_SATP_ALUA policy configuration again and never picks the right one (VMW_SATP_DEFAULT_AA.) as specified by the command line listed below

Ex:

esxcli storage nmp satp rule add -s VMW_SATP_DEFAULT_AA -V Storage_Vendor -M "^Storage Model*" -c tpgs_off -f

I really appreciate your help here!

Regards,

Andy

1 Reply
julienvarela
Commander
Commander

Hi,

you can try using something like this :

Found here : VMware: Configure Multipath Policy via PowerCLI | VMpros

$strHost = Get-VMHost
connect-viserver $strHost
$esxcli = $strHost | Get-EsxCLI
$esxcli.storage.nmp.satp.set($null,”VMW_PSP_RR”,”VMW_SATP_ALUA”)
$strHost | Get-ScsiLun -CanonicalName “naa.6001*” | Set-ScsiLun -Multipathpolicy “roundrobin”
$esxcli.storage.nmp.device.list() | Where {$_.PathSelectionPolicy -eq “VMW_PSP_RR”} | %{$esxcli.storage.nmp.psp.roundrobin.deviceconfig.set($null,$true, $_.device, 1,”iops”,$null)}
$esxcli.storage.nmp.device.list() | Where {$_.PathSelectionPolicy -eq “VMW_PSP_RR”} | %{$esxcli.storage.nmp.psp.roundrobin.deviceconfig.get($_.device)}

You can change multipath policy as you need.

Or here from a previous post : Set multipath policy to FIXED and load balance preffered paths for a set of RDM LUNs

Julien

Regards, J.Varela http://vthink.fr