Share via


Powershell to find mpio path state and if its using alua

Question

Saturday, August 4, 2012 8:33 PM

Hello,

With powershell I can get the mpio disk instances and number of paths.

I can't seem to get any information to show up for path state or alua.

PS C:\ gwmi -Namespace root\wmi -Class mpio_dsm_path -list

   NameSpace: ROOT\wmi

Name                                Methods              Properties
                                             
MPIO_DSM_Path                       {}                   {DsmPathId, PathWeight, PrimaryPath, Reserved}

PS C:\ gwmi -Namespace root\wmi -Class mpio_dsm_path_v2 -list

   NameSpace: ROOT\wmi

Name                                Methods              Properties
                                             
MPIO_DSM_Path_V2                    {}                   {ALUASupport, DsmPathId, FailedPath, OptimizedPath...}

PS C:\ (gwmi -Namespace root\wmi -Class mpio_dsm_path_v2).failedpath
PS C:\

does not list anything. Any help would be appreciated.

All replies (7)

Monday, August 13, 2012 4:21 AM ✅Answered

Hi ,

It appears there are no WMI objects in that class you are a calling.

The –list parameter will show the class definition, even if no objects are found.
You can type the following command and no result returned.
gwmi -Namespace root\wmi -Class mpio_dsm_path_v2

There is no class objects have been found in that namespace. Meaning any subsequent calls for sub properties (like .failedpath) will return null.

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Saturday, August 4, 2012 11:12 PM

I know nothing about this WMI class or drivers in general, but I see in http://msdn.microsoft.com/en-us/library/windows/hardware/ff562388(v=vs.85).aspx that Windows creates the class but doesn't really fill it with data.  Apparently you need something in your OS that will fill it out.  I guess your PC doesn't have this other part.

Jose R. MCP
Code Samples


Monday, August 6, 2012 9:01 PM

Hi webJose,

thanks for this pointer which starts out:

MPIO publishes the MPIO_DSM_Path_V2 WMI class but expects the DSM to register the GUID and handle its implementation. An MPIO driver uses the MPIO_DSM_Path_V2 WMI class to identify the path ID as reported by a DSM.

I am using MSDSM (microsoft device specific module) to handle my pathing. I wonder if I have to query both at the same time?

(I currently have 4 paths, 2 optimized, 2 non-optimized)

Any suggestions would be appreciated.


Tuesday, August 7, 2012 2:39 AM

Hi,

Please try below code:

(gwmi -Namespace root\wmi -Class mpio_dsm_path_v2).failedpath.value

or

gwmi -Namespace root\wmi -Class mpio_dsm_path_v2 |select-object failedpath

In this issue, we should fist check all properties and methods for it:

gwmi -Namespace root\wmi -Class mpio_dsm_path_v2 |get-member

Regards

Yan Li

 

TechNet Subscriber Support

If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback

here.

Yan Li

TechNet Community Support


Tuesday, August 7, 2012 9:32 PM | 1 vote

Hi Yan Li,

Thank you for your assistance, but I did not get any value for failedpath. (or other properties)

PS C:\Users\Administrator> (gwmi -Namespace root\wmi -Class mpio_dsm_path_v2).failedpath.value
PS C:\Users\Administrator>

I can get this info:

PS C:\Users\Administrator> (gwmi -Namespace root\wmi -Class mpio_disk_info).driveinfo | % {Write-host "Name: $($_.name) Paths: $($_.numberpaths)"}
Name: MPIO Disk0 Paths: 4
Name: MPIO Disk1 Paths: 4
Name: MPIO Disk2 Paths: 4
Name: MPIO Disk3 Paths: 4
Name: MPIO Disk4 Paths: 4
Name: MPIO Disk5 Paths: 4
Name: MPIO Disk6 Paths: 4
Name: MPIO Disk7 Paths: 4
Name: MPIO Disk8 Paths: 4

Now I need to add the additional information which appears the dsm_v2 class maybe holding.

thanks


Friday, August 10, 2012 10:57 AM

Hi ,

Is this ps helpful to retrieve the info?

PS C:\Users\Administrator> (gwmi -Namespace root\wmi -Class MPIO_PATH_INFORMATION).Pathlist

Thanks.

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Friday, February 5, 2016 6:40 PM

I know this is an old thread but, since I didn't see an answer, I thought I would post it here.

You can query the DSM_QueryLBPolicy_V2 WMI class.  That will return a DSM_Load_Balance_Policy_V2 LoadBalancePolicy class. That provides an array of MPIO_DSM_Path_V2 classes.  There you can find the path state information you're looking for.