The CLUSCTL_RESOURCE_QUERY_MAINTENANCE_MODE resource control code retrieves the maintenance mode setting of the designated resource, as specified in section

ClusAPI Protocol version 2.0 servers SHOULD<171> support this control. ClusAPI Protocol version 3.0 servers MUST support this control.

The server MUST fail this method by using error ERROR_INVALID_FUNCTION (0x00000001) if maintenance mode is queried for any nonstorage class resource type.

After successful completion of the method, the server MUST write either a CLUS_MAINTENANCE_MODE_INFO structure (section or a CLUS_MAINTENANCE_MODE_INFO_EX structure (section to the buffer designated by lpOutBuffer. The structure written depends upon the size of lpOutBuffer, as designated by nOutBufferSize.

For example, a disk is placed in maintenance mode if the disk requires a consistency check that, as a side effect, locks the volume, making it unavailable to the cluster. Normally, this would cause the health check for the resource to fail, but because the resource is in maintenance, the resource MUST continue to report that the disk is healthy. Other applications MAY fail as a result, but the cluster MUST NOT fail the resource.

The server SHOULD accept a CLUSCTL_RESOURCE_QUERY_MAINTENANCE_MODE resource control code request if its protocol server state is read-only and MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.