Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 208545

Re: Powercli, change pathing: RDMS to Fixed and VMFS to Round Robin

$
0
0

You don't really need to explicitly set your VMFS volumes to round robin, you can change the default PSP for your array type then reboot the host and everything will be set to round robin by default including any new luns in the future so all you would need to pay attention to is any new RDMs.

 

 

I run this command on each host to set the default to round robin.  You will to change the "VMW_SATP_ALUA_CX" to whatever SATP your array uses.

 

$esxcli.storage.nmp.satp.set($null,"VMW_PSP_RR","VMW_SATP_ALUA_CX")

 

 

Then I have this to find RDMs and set them to MRU on a cluster basis.

 

$cluster = "Cluster Name"

$vmhosts = Get-Cluster $cluster | Get-VMHost

$vms = Get-Cluster $cluster | Get-VM

$rdms = $vms | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select -Unique ScsiCanonicalName

 

foreach($vmhost in $vmhosts){

$esxcli = get-esxcli -VMHost $vmhost

 

    foreach($rdm in $rdms){

    $naaid = $rdm.ScsiCanonicalName

  

     Write-Host "Setting RDM $naaid to perenially reserved on host $vmhost"

    $esxcli.storage.core.device.setconfig($false, "$naaid", $true)

 

 

    Write-Host "Setting MPP on $naaid on host $vmhost"

    $esxcli.storage.nmp.device.set($null, "$naaid", "VMW_PSP_MRU")

    }

}


Viewing all articles
Browse latest Browse all 208545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>