Cluster Resources

A cluster resource is any physical or logical component that has the following characteristics:

Resources are managed in the cluster environment through communication between the Cluster Service through a Resource Monitor to a resource DLL, a mainly passive translation layer that implements entry point functions defined by the Resource API. In response to a Cluster Service request, the Resource Monitor calls the appropriate entry point function to check and control the resource's state.

A resource DLL is loaded into the Resource Monitor's process, runs in the system account, and must be considered privileged code. All of the resource DLLs provided with Cluster Server run in a single process. Resource DLLs can use any convenient interprocess communication mechanism to interact with their resources.

Cluster resources maintain pieces of information known as properties. There are common resource properties that describe all resources regardless of their type and private resource properties that describe resources of a particular type. The local restart policy, defining the desired actions in the event that the resource cannot continue on the current node, is an example of a common property. The signature of a Physical Disk resource is an example of a private property because it is irrelevant for other types of resources. Common properties are stored in the cluster database; private properties can be stored in the cluster database, in an alternate location, or generated on demand.

Cluster resources also maintain a list of nodes that can act as valid hosts. For example, a Physical Disk resource may be hosted only on nodes that are physically connected to the resource. Applications can retrieve this list by calling ClusterResourceEnum and passing CLUSTER_RESOURCE_ENUM_NODES as the dwType parameter.

To interact with a cluster resource, applications and the Cluster Service call the Cluster API function ClusterResourceControl and specify as a parameter a control code. A control code is a 32-bit value that describes a particular operation. Some of the operations associated with resource control codes are supported by the resource DLL; others are supported by the associated Resource Monitor.