22.214.171.124.122 ApiChangeCsvState (Opnum 123)
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 126.96.36.199.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 );
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.
The operation is still in progress.
The current protocol server state of the server is not read/write.
The server does not support this method.
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 188.8.131.52). 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 184.108.40.206.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).
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.
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 returns 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 treats errors specified in 220.127.116.11 as recoverable errors and initiate the reconnect procedure as specified in section 18.104.22.168.