Compartir a través de


CLUSCTL_RESOURCE_QUERY_MAINTENANCE_MODE control code

Queries the maintenance mode state of the specified disk resource. Applications use this control code as a parameter to the ClusterResourceControl function.

ClusterResourceControl( hResource,                               // resource handle
                        hHostNode,                               // host node
                        CLUSCTL_RESOURCE_QUERY_MAINTENANCE_MODE, // this control code
                        NULL,                                    // not used
                        0,                                       // not used
                        lpOutBuffer,                             // output buffer: string
                        cbOutBufferSize,                         // allocated buffer size (bytes)
                        lpcbBytesReturned );                     // size of returned data (bytes)

Parameters

The following control code function and DLL support parameters are specific to this control code. For complete parameter descriptions, see ClusterResourceControl.

lpOutBuffer

On a successful return, points to a CLUS_MAINTENANCE_MODE_INFO structure containing the current maintenance mode state of the disk resource.

Return value

ClusterResourceControl returns one of the following values:

ERROR_SUCCESS

0

The disk resource DLL supports maintenance mode and the function request was completed successfully.

ERROR_INVALID_FUNCTION

1

The disk resource DLL does not support maintenance mode.

ERROR_MORE_DATA

234 (0xEA)

Output buffer size is too small to return the requested data.

ERROR_INVALID_STATE

1369 (0x559)

The disk resource is offline.

ERROR_HOST_NODE_NOT_RESOURCE_OWNER

5015 (0x1397)

A disk resource not owned by the hosting node cannot be queried for maintenance mode status.

ERROR_CLUSTER_INVALID_REQUEST

5048 (0x13B8)

A quorum resource cannot be queried for maintenance mode status.

System error code

The operation failed. The value of lpcbBytesReturned is unreliable.

Remarks

Only disk resources support maintenance mode.

A resource must be online and not identified as the quorum resource in order to be placed in maintenance mode.

The calling application must direct the maintenance mode resource control codes to the node hosting the resource.

ClusAPI.h defines the 32 bits of CLUSCTL_RESOURCE_QUERY_MAINTENANCE_MODE (0x010001e1) as follows:

Component Bit location Value
Object code
24 31
CLUS_OBJECT_RESOURCE (0x1)
Global bit
23
CLUS_NOT_GLOBAL (0x0)
Modify bit
22
CLUS_NO_MODIFY (0x0)
User bit
21
CLCTL_CLUSTER_BASE (0x0)
Type bit
20
External (0x0)
Operation code
0 23
CLCTL_QUERY_MAINTENANCE_MODE (0x1e1)
Access code
0 1
CLUS_ACCESS_READ (0x1)

For more information, see Control Code Architecture.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Datacenter with SP1, Windows Server 2008 Enterprise with SP1
Header
ClusAPI.h

See also

External Resource Control Codes

Maintaining Physical Disk Resources

CLUS_MAINTENANCE_MODE_INFO

CLUSCTL_RESOURCE_SET_MAINTENANCE_MODE

ClusterResourceControl