Check Paths on FC-HBA’s

Check Paths on FC-HBA’s

Often you have to check the paths on your hosts.

At least if you upgrade your UCS or SAN infrastructure 😉 Do it with PowerCLI!

I spent a big amount of time last week doing research on this topic, doing these checks with PowerCLI.

I just wanted to see (per host) which HBA has it’s paths to his storage (like in the vSphere Client):

There are lots of approaches for this.

jfrmilner: Check for “Dead” paths on HBAs with PowerCLI

or this performance optimized version practical-admin.com: PowerCLI: Show HBA Path Status

But every script I found was displaying incorrect path numbers. They all made the same mistake, counting the paths from datastore side. If you want to get the same result as in vSphere client, you should have a look on my script.

So I had to find my way …

At this point there goes a big thank you to “PowerCLI God” LucD 😉

Finally I came up with a script that does exactly what I have imagined:

 


The output should look like this:

UPDATE:

There is a cosmetic issue in ESXi 6.0 U3! See VMware KB 2149992

This causes a wrong number of active paths shown.

7 thoughts on “Check Paths on FC-HBA’s

    1. Check Line 75, there is a where condition that maybe does not fit to your environment. You can troubleshoot if you check the output of: $esx.ExtensionData.Config.StorageDevice.HostBusAdapter

      1. Tried that too….still blank output….moreover it start and ends withing a second, so probably script is not even triggering

        1. Did you execute the function and call it afterwards? Like
          Get-FCPaths -vHost myHost-*
          If still empty, just query the two lines:
          $esx = Get-VMHost -Name yourESXiHost
          $esx.ExtensionData.Config.StorageDevice.HostBusAdapter

          The output is maybe huge(depends on your adapter counts), you have to search your FC- HBA and look what is beside “Drivers”

          In my case it’s a Qlogic HBA -> “qlnativefc”

Leave a Reply

Your email address will not be published. Required fields are marked *