With the new improvements to vSphere native mulit pathing (NMP) in 5.1 I wanted to change all my LUNS to use Round Robin as per the new EMC best practice with my VNX flare code.
However I also have MSCS clusters which only support Fixed mode as per http://kb.vmware.com/kb/1037959.
Subsequently I want to get all my VMFS volumes and set them to Round Robin, and leave all my RDMs set to Fixed.
I am hoping to do this dynamically so I can leave it with the admin here to run whenever he wants, but I am struggling to get this done.
What I’ve tried so far.
I can get all my LUNs with these command.
$esxcli
= Get
-EsxCli
$Allmyluns = Get-esxcli.storage.nmp.device.list() | Where {$_.device -like "naa.*"}
I can get all my RDMs with this command
$RDMS = get-vm | get-harddisk | where {$_.SCSIcanonicalname – like “naa.*” | select SCSIcanonicalname
I can set the method once I have the storage by doing this
$esxcli
= Get
-EsxCli
Foreach ($lun in $allmyluns({
$esxcli.nmp.device.setpolicy($null, $_.Name,
"VMW_PSP_RR")
}
I have also thought about writing a csv or text file with the first command and trying to remove the entries with the second command but that is a bit past me, and I may be trying to over-complicate things unnecessarily
.
But what I can’t do is work out how to get a list whenever I want that has all the VMFS LUNS but not any of the RDM LUNS. So I can dynamically feed this into a script which updates VMFS pathing to Round Robin.
Any help, input or ideas would be greatly appreciated