CLUSCTL_RESOURCE_GET_CHARACTERISTICS

The CLUSCTL_RESOURCE_GET_CHARACTERISTICS control code is used to request the intrinsic characteristics of a resource.

Quick Info

Type: External
Access: CLUS_ACCESS_READ
Input: None
Output: DWORD bitmask
Global: CLUS_NOT_GLOBAL
Modify: CLUS_NO_MODIFY
Code: CLCTL_GET_CHARACTERISTICS

Notes to Callers

The lpOutBuffer parameter of ClusterResourceControl points to a bitmask that describes the resource's characteristics. The bits can be set to one or more of the following values:

CHARACTERISTICS value Description
CLUS_CHAR_UNKNOWN Resource has no known characteristics.
CLUS_CHAR_QUORUM Resource is capable of being the quorum resource for a cluster.
CLUS_CHAR_DELETE_
REQUIRES_ALL_NODES
Resource requires delete notification on all nodes.

Cluster Server's Physical Disk resources return CLUS_CHAR_QUORUM and CLUS_CHAR_DELETE_REQUIRES_ALL_NODES from a CLUSCTL_RESOURCE_GET_CHARACTERISTICS control code request.

Notes to Resource DLL Writers

If you do not handle the CLUSCTL_RESOURCE_GET_CHARACTERISTICS control code in your ResourceControl entry point function, return ERROR_INVALID_FUNCTION. The Resource Monitor will read the Characteristics value from the resource's key in the cluster database.

If you do support CLUSCTL_RESOURCE_GET_CHARACTERISTICS, return a value that accurately describes your resource. A resource DLL that manages resources incapable of functioning as quorum resources must not, for example, return CLUS_CHAR_QUORUM. Doing so can cause the cluster to become unusable if a resource of the type managed by the resource DLL is chosen as the quorum resource. Likewise, when a resource DLL for quorum resources does not set the CLUS_CHAR_QUORUM bit, its resources will not be able to be selected as quorum resources.

Setting CLUS_CHAR_DELETE_REQUIRES_ALL_NODES indicates that all nodes must be online before a resource handled by your resource DLL can be deleted. The reason for the advance warning is to provide your DLL with the opportunity to remove any information from one or more nodes. For example, if your resource DLL stores data in a portion of the cluster database or in an alternate location, you will probably want to return the CLUS_CHAR_DELETE_REQUIRES_ALL_NODES as a characteristic so that you receive the delete notification. The Cluster Service notifies a resource DLL by calling its ResourceControl function with the CLUSCTL_RESOURCE_DELETEcontrol code. Note that you can get these notifications regardless of whether the CLUS_CHAR_DELETE_REQUIRES_ALL_NODES characteristic bit is set; setting the bit guarantees it.

When a resource DLL returns the CLUS_CHAR_DELETE_REQUIRES_ALL_NODES characteristic, all nodes must be online in order for resources of that type to be deleted. If all nodes are not online, the delete attempt fails and the DeleteClusterResource function returns ERROR_HOST_NODE_NOT_AVAILABLE.