Controls the current state of a cluster resource.
#include <ncssdk.h> NCS_RETURN NCS_ResourceControl ( NCS_HANDLE ncssdkHandle, NCS_MAPI ncsMapi, NCS_RESOURCE *resource, void *cxt);
(IN) Specifies the handle supplied by NCS.
(IN) Specifies the NCS operation codes that the API can perform, as defined in ncssdk.h. For example, if the operation code is STATE, the function will return the current state of the cluster resource. Information is passed into the resource field.
(IN/OUT) Points to the cluster resource (for example, the node upon which the resource is running, history of the resource, etc.).
(IN/OUT) Points to the context for the callback (usually NULL).
Name |
Description |
---|---|
SUCCESS |
NCS_SUCCESS. |
NCS_ALLOC_ERROR |
Insufficient memory to perform the operation. |
NCS_BAD_PARAMETER |
See NDS Error Codes. |
NCS_INTERNAL_ERROR |
Unspecified internal error. |
NCS_UNKNOWN |
Unspecified error. |
NCS_ResourceControl enables you to offline a cluster resources from the command line or you can migrate it from one server to another server in the cluster. If NCS_MAPI is STATE or ONLINE and the resource name is invalid or misspelled, the new resource goes into NDS_SYNCH state until a new resource priority stream deletes it.