Home | Site Map | Cisco How ToNet How To | Wireless |Search | Forums | Services | Donations | Careers | About Us | Contact Us|

How to get the Volume GUID for the cluster volume

Active Directory, Domain, DNS, WINS, DHCP, SBS, New Releases.

How to get the Volume GUID for the cluster volume

Postby guest » Tue Dec 27, 2011 10:06 am

I'm working with an application which needs the Volume GUIDs of the cluster Storage resource. For windows 2003 clusters we were using the Cluster Object Physical Disk private property "MPVolGuids". But in the new SDK documentation i can see that this got removed and is termed "reserved for internal use by the Cluster service".So it will be helfpfull if i can get to know whether there is an alternate for getting the volume GUID for Physical Disk cluster resource.
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm

Re: How to get the Volume GUID for the cluster volume

Postby guest » Tue Dec 27, 2011 10:07 am

Well, I used the script here - http://www.microsoft.com/technet/script ... x?mfr=true
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_Volume")

For Each objItem In colItems
WScript.Echo "Automount: " & objItem.Automount
WScript.Echo "Block Size: " & objItem.BlockSize
WScript.Echo "Capacity: " & objItem.Capacity
WScript.Echo "Caption: " & objItem.Caption
WScript.Echo "Compressed: " & objItem.Compressed
WScript.Echo "Device ID: " & objItem.DeviceID
WScript.Echo "Dirty Bit Set: " & objItem.DirtyBitSet
WScript.Echo "Drive Letter: " & objItem.DriveLetter
WScript.Echo "Drive Type: " & objItem.DriveType
WScript.Echo "File System: " & objItem.FileSystem
WScript.Echo "Free Space: " & objItem.FreeSpace
WScript.Echo "Indexing Enabled: " & objItem.IndexingEnabled
WScript.Echo "Label: " & objItem.Label
WScript.Echo "Maximum File Name Length: " & objItem.MaximumFileNameLength
WScript.Echo "Name: " & objItem.Name
WScript.Echo "Quotas Enabled: " & objItem.QuotasEnabled
WScript.Echo "Quotas Incomplete: " & objItem.QuotasIncomplete
WScript.Echo "Quotas Rebuilding: " & objItem.QuotasRebuilding
WScript.Echo "Serial Number: " & objItem.SerialNumber
WScript.Echo "Supports Disk Quotas: " & objItem.SupportsDiskQuotas
WScript.Echo "Supports File-Based Compression: " & _
objItem.SupportsFileBasedCompression
WScript.Echo
Next
and ran it on one of my cluster nodes.Here is the info from one of my cluster disks -Automount: TrueBlock Size: 4096Capacity: 941617152Caption: H:\Compressed: FalseDevice ID: \\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\Dirty Bit Set: FalseDrive Letter: H:Drive Type: 3File System: NTFSFree Space: 907988992Indexing Enabled: TrueLabel: DiskHMaximum File Name Length: 255Name: H:\Quotas Enabled: FalseQuotas Incomplete: FalseQuotas Rebuilding: FalseSerial Number: 1343570812Supports Disk Quotas: TrueSupports File-Based Compression: TrueIs the info you need listed here? Seems like it is.
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm

Re: How to get the Volume GUID for the cluster volume

Postby guest » Tue Dec 27, 2011 10:07 am

Thanks for the reply. I need to add some points for what I'm looking for.

The application that i do work on, needs the volume GUID for Cluster Resourse Physical Disk . I will describe in brief how i fetch the same for win 2k cluster.

I first open the root of the cluster database subtree for a particular resource using the API: GetClusterResourceKey(). Then using the API (ClusterRegOpenKey ()) I open an existing cluster database key. Using this registry subkey I take the cluster private property "MPVolGuids" using the cluster API ResUtilGetPrivateProperties (). Here I'm able to get the Volume GUID for a the specified resource. In other terms I'm able to have a mapping of Resuorce to Volume GUID by following this method.

The workaround suggested by you works for all the resources in the Cluster and i wont be able to see a mapping of the Volume GUID to a particular Cluster Resourse Physical Disk. This is same as using querydosdevice() API. Also the same will work only for those volumes which are online to a particular node where you are running the script. The script wont give you the Volume GUID for the resources (Cluster Resourse Physical Disk ) which are not online to this node. My application needs the Volume GUID for all the Cluster Physical Drive Resources connected irrespective of whether the resource is online or offline to the particular node, which we were able to capture by the above mentioned method.

Is there any particular API given by the cluster using which i can get the Volme GUID for Cluster Resource Physical Disk? Otherwise please help me with some alternatives.

Thanks & regards
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm

Re: How to get the Volume GUID for the cluster volume

Postby guest » Tue Dec 27, 2011 10:08 am

We no longer have the MPVolGuids private property for the Physical Disk resource in Longhorn. The volume guid data is now stored under a different private property and is in an internal data structure, instead of the string value you could parse before. So it's not much good to you.

But, there is another way! There is a new EX flavor of the get disk info cluster control code that will return you the volume guid in Longhorn, here it is:

CLUSCTL_RESOURCE_STORAGE_GET_DISK_INFO_EX
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm


Return to Windows

Your Ad Here

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests