That looks ok.
Just remove the WhatIf when you are sure the code is handling the correct LUNs.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
What do you mean by prerequisites?
Otherwise, changing the path selection to Round Robin hasn't changed.
See Re: changing path policy to round robin_powercli
From that screenshot I would guess 2, but to see exactly how many extents, check what $dr.ExtensionData.Info.Vmfs.Extent says.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
1:i m checking with storage team to see if round robin being suported at storage array which i think all moderan arrays are supporting
2:once it is configured i am running the following code to change to round robin
$vmfsdatastore=Get-Datastore|?{$_.Type -eq "VMFS"}|
$vmfsdatastore.count
$vmfsdatastore|get-scsilun|?{$_.multipathpolicy -ne "roundrobin"}|Set-ScsiLun -MultipathPolicy RoundRobin -WhatIf
i think above two are sufficient enough to change multipath policy to round robin if yu could confirm one more time .
That looks ok.
Just remove the WhatIf when you are sure the code is handling the correct LUNs.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks lun .one last thing for this post
below means it has one extent or no additional extent.
It has 1 extent.
The official description for Extent is "The list of partition names that comprise this disk's VMFS extents."
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks luc.
hi luc ,
if yu could suggest why the gollowing expression not working .i want to filter out t10.ata... (local disks) from below output .
1:will it not accept wildcard * in this.
2:does it make any sense tp put round robin to local disks.
You should use -notlike instead of -ne
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks luc .for some reasons poreshell become slow hope its not infected with virus:smileylaugh:
The Get-ScsiLun cmdlet is terribly slow
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
ohh
i think we are doing something wrong here we need to follow below
https://vmarena.com/how-to-change-all-luns-to-round-robin-policy-using-powercli/
if you can verfiy .i need to put each host in maintenance mode and do change in policy insted of directly going to datastores.
What do you mean by "we are doing something wrong"?
That post uses exactly the same code as is present in the link I shared earlier.
Why would the ESXi node need to be in maintenance mode?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
well my understanding it a typical path to storage device
consist of FC adapter ,cable ,connection to switch port and then storage contoller port .
roundrobin will utilize all paths if more than such combinations are avaiable .
so this post uses get-vmhost|get-scsilun
while we were discussing get-datastore|get-scsilun
Still don't see where we would be "wrong".
The Get-ScsiLun cmdlet accepts a VMHost or a Datastore parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
well i am going with below which we decided its going to consider only vmfs datastore .
and no need for maintenace mode .i thought of checking this in test environemt but unfortunately i dont have .
and it should not impact any thing .if yu like to add anyother thing ...
$vmfsdatastore=Get-Datastore|?{$_.Type -eq "VMFS"}
$vmfsdatastore|get-scsilun|?{$_.multipathpolicy -ne "roundrobin" -and $_.canonicalname -notlike "t10.*"}||Set-ScsiLun -MultipathPolicy RoundRobin
No, go for it
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thanks Luc.
Hi Luc,
If you could help me suggesting the way to check whether following naa ids constitute datastores which are shared and not local .