Export (0) Print
Expand All
Expand Minimize

3.1.4.2.122 ApiChangeCsvState (Opnum 123)

(Protocol Version 3) The ApiChangeCsvState method instructs the server to change the accessibility of the disk associated with hResource.

Servers SHOULD<92> support this method.

If dwState is 1, the server MUST set ResourceSharedVolumes to TRUE and convert all volumes associated with hResource to cluster shared volumes. The server MUST set the initial state of all cluster shared volumes associated with hResource such that volume maintenance mode, redirected mode, and backup mode are all disabled.

If dwState is 1, the server SHOULD also designate the group associated with hResource as a special group, as specified in section 3.1.1.1.4.

If dwState is 0, the server MUST set ResourceSharedVolumes to FALSE and stop making the volumes associated with hResource accessible to all nodes as cluster shared volumes.

If dwState is 0, the server SHOULD also remove the special group designation of the group associated with hResource.

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

The server MUST require that the access level associated with the hResource context handle is "All" (section 3.1.4).

error_status_t ApiChangeCsvState(
  [in] HRES_RPC hResource,
  [in] DWORD dwState,
  [out] error_status_t* rpc_status
);

hResource: An HRES_RPC context handle that was obtained in a previous ApiOpenResource, ApiOpenResourceEx, or ApiCreateResource method call.

dwState: This MUST be 1 to make the disk associated with hResource accessible from all cluster nodes. This MUST be 0 to make the disk associated with hResource accessible only from the cluster node that mounted the disk.

rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether it succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for comm_status and fault_status, as specified in Appendix E of [C706].

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code Description

0x00000000
ERROR_SUCCESS

Success.

0x000003E5
ERROR_IO_PENDING

The operation is still in progress.

0x00000046
ERROR_SHARING_PAUSED

The current protocol server state of the server is not read/write.

0x000006D1
RPC_S_PROCNUM_OUT_OF_RANGE

The server does not support this method.

0x000013B8
ERROR_CLUSTER_INVALID_REQUEST

The operation is invalid for the cluster or for the specified resource. It is invalid for the cluster if the dwState parameter is 1 and the requested state is not enabled for the cluster; for instance, the server EnableSharedVolumes state is FALSE (indicating that the server does not support cluster shared volumes) (see section 3.1.1.4). The operation is invalid for the specified resource if any of the following conditions are met:

  • The dwState parameter is 1, and the specified resource is already deployed to an application/service.

  • The dwState parameter is 1, and the specified resource is in maintenance mode (see section 3.1.1.1.1.2).

  • The dwState parameter is 1, and the specified resource depends on one or more additional resources.

  • The dwState parameter is 0, and the specified resource does not currently allow volumes to be shared to all nodes in a cluster (ResourceSharedVolumes is already FALSE).

0x000013D7
ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED

The dwState parameter is 1 and the specified resource is not of the correct type. Shared access can only be enabled for resources that are of the Physical Disk Resource type.

0x0000138C
ERROR_RESOURCE_NOT_ONLINE

The dwState parameter is 1 and the specified resource is not online. The resource must be online to enable shared access.

For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table. The client SHOULD treat errors specified in 3.2.4.6 as recoverable errors and initiate the reconnect procedure as specified in section 3.2.4.6.

 
Show:
© 2014 Microsoft