question

AnandP-0447 avatar image
0 Votes"
AnandP-0447 asked AnandP-2750 commented

Resource discovery in Failover Clusters

Hello,

I have a .Net web application that runs in a Failover Cluster. It executes in the 'Cluster Group' owner node.
I need to get the file system information of shared disks in the cluster. I have a path to a file in the disk. The function I have used is GetVolumePathName() (fileapi.h) which returns the volume mount point for the specified path. This mount point is then passed to GetVolumeInformation() function which returns the file system type. This works well with Cluster Shared Volumes and if the shared disk is owned by the 'Cluster Group' owner node.
But, if a cluster disk is owned by a node other than this 'Cluster Group' owner node, I am not able to get the information. The functions GetVolumePathName() and ClusterGetVolumePathName() both return error code 2. GetVolumeInformation returns empty file system.
I would like to know if there is a function or API or WMI query that can give me the file system information in this case.

In general, how to discover the resources in a node that is not the Cluster Group owner, if not using a cluster-wide command such as Get-Volume or a WMI query with a class such as MSFT_Volume?

Thank you,
Anand

windows-server-clustering
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

jiayaozhu-MSFT avatar image
0 Votes"
jiayaozhu-MSFT answered AnandP-2750 commented

Hi,

Thank you for your reply!

According to your description, it seems that CSV is started in your cluster. Thus, the file path is migrated under \ClusterStorage, so the file system status cannot be accessed through the original path. Try to use the Get-ClusterResource command in your PowerShell. More information:

https://docs.microsoft.com/en-us/powershell/module/failoverclusters/get-clusterresource?view=windowsserver2019-ps

In addition, after research, it seems that currently there are no ways to check your file system status other than a cluster-wide command such as Get-Volume or a WMI query with a class such as MSFT_Volume

Thank you for your time!

Best regards
Joann


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Thank you for clarifying that a cluster-wide command or class will be needed for the resource discovery.
Regarding the first question that I have, information for CSVs is fetched just fine using the GetVolumePathName and GetVolumeInformation functions. The issue is with the shared disks that are not CSVs. If those belong to a node that's different than the ClusterGroup owner node, I am not able to get the similar information using these functions.

Thanks,
Anand

0 Votes 0 ·