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

Re: Delay balancing FC paths

$
0
0

Hello LucD. Yes, I'm using Set-ScsiLunPath_

 

$Servidor=Get-VMHost "esxhostname"

 

$EsESX3 = $false

$versio = $servidor | % { $server = $_ |get-view; $server.Config.Product |  Select-Object Version }

if ($versio.version -lt 4) {

   $EsESX3 = $true

}

 

$luns = $Servidor | get-scsilun -luntype disk | Sort-Object CanonicalName

 

foreach ($lun in $luns) {

   $NomRunTime = $lun | Select RunTimeName, CanonicalName

   $paths = Get-ScsiLunPath -ScsiLun $lun

   $NumPaths = $paths | Measure-Object | Select-Object -Property Count

   $dades = $lun | Select-Object CanonicalName, ConsoleDeviceName, CapacityMB, MultipathPolicy

 

 

   If ($EsESX3) {

      $RTName = $NomRunTime.CanonicalName  # vmhbax:y:x a ESX 3.5

   }else{

      $RTName = $NomRunTime.RunTimeName    # vmhbax:y:x a ESX 4.1

   }

 

 

   $LunTag = Select-String -InputObject $RTName -Pattern "(\d+)$" | Select @{N="LunTag";E={$_.matches[0].Value}}

 

 

   $ContPaths=1

   foreach ($path in $paths) {

      If ($LunTag.LunTag -eq "155") {

         If ($path.SanId.Substring(9,2) -eq "68") {

            Set-ScsiLunPath -Active $true -ScsiLunPath $path -Confirm:$false

         }else{

            Set-ScsiLunPath -Active $false -ScsiLunPath $path -Confirm:$false

         }

      }

      $ContPaths = $ContPaths + 1

   }

}


Viewing all articles
Browse latest Browse all 232413

Trending Articles



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