Hi There,
I am trying to collect Disk Partition details from a cluster using the following function . This is working perfectly fine in most cases.
In some customer places the query '"Associators of {MSCluster_Disk.ID='"& colItem.ID & "'} where AssocClass = MSCluster_DiskToDiskPartition" ' not returning any thing/failing.
The following is the difference I noticed when the query executes successfully and failed.
1. In Successful case : The value of 'colItem.ID' is some like 4137123909 (i.e MSCluster_Disk.ID)
2. In Failure case : The value of 'colItem.ID' is some thing like '{e13fe43d-7b31-46a3-bad3-b96b6353cbf1}' . (i.e MSCluster_Disk.ID)
Function getDisks strQry = "select * from MSCluster_Disk" Set colItems = wbemServices.ExecQuery( strQry ) On Error Resume Next For each colItem in colItems On Error Resume Next Set diskPartitions = wbemServices.ExecQuery ("Associators of {MSCluster_Disk.ID='"& colItem.ID & "'} where AssocClass = MSCluster_DiskToDiskPartition" ) For each diskPartition in diskPartitions 'Some Logic here blah blah .... Next Next End Function
Any help on how to troubleshoot this will be great.
Regards,
Krishna