Hi,
We have storage maintenance activity in our environment and we need to disable 2 out of 4 LUN paths of each LUN presented to a set of esx hosts.
How to disable lun paths using powercli.
Please help.
You can use the Set-ScsiLunPath cmdlet to disable and enable a specific path with PowerCLI: vSphere Documentation Center
Your maintenance will be on a Fabric ? If yes, take a look at this another thread to disable ptah for a specific HBA: Re: Disabling paths to migrate all FC storage connections to specified port on HBA
Came across this post looking for the same thing. I needed to disable paths on only one hba for the whole cluster and this worked well.
get-cluster clustername | get-vmhost | Get-ScsiLun | Get-ScsiLunPath | ?{ $_.Name -like "vmhba45*" } | Set-ScsiLunPath -Active:$false
I had cut over some fcoe paths to straight fc...I used this as well.
Get-Cluster clustername | Get-VMHost | Get-ScsiLun | Get-ScsiLunPath | ?{ $_.Name -like "*fcoe*" } | Set-ScsiLunPath -Active:$false
this worked because I found that the Get-ScsiLunPath cmdlet had a property name (and LunPath property as well) like this...
Name : vmhba38:C0:T0:L1,fcoe.yyyyyyyyyyyyyyyyyyy:zzzzzzzzzzzzzzzzzz-fcoe.wwwwwwwwwwww:vvvvvvvvvvvvvvvv-naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ScsiLunId : HostSystem-host-0000/naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ScsiLun : naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
LunPath : vmhba38:C0:T0:L1,fcoe.yyyyyyyyyyyyyyyyyyy:zzzzzzzzzzzzzzzzzz-fcoe.wwwwwwwwwwww:vvvvvvvvvvvvvvvv-naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SanId : aa:bb:cc:dd:ee:ff:00:11:22
State : Standby
Preferred : False
ScsiCanonicalName : naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ExtensionData : VMware.Vim.HostMultipathInfoPath
Client : VMware.VimAutomation.ViCore.Impl.V1.VimClient