MoveClusterGroup function

Moves a group and all of its resources from one node to another. The PCLUSAPI_MOVE_CLUSTER_GROUP type defines a pointer to this function.

Syntax


DWORD WINAPI MoveClusterGroup(
  _In_     HGROUP hGroup,
  _In_opt_ HNODE  hDestinationNode
);

typedef DWORD (WINAPI *PCLUSAPI_MOVE_CLUSTER_GROUP)(
    _In_     HGROUP hGroup,
    _In_opt_ HNODE  hDestinationNode
);

Parameters

hGroup [in]

Handle to the group to be moved.

hDestinationNode [in, optional]

Handle to the node where the moved group should be brought back online or NULL.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code. The following is one of the possible error codes.

ERROR_IO_PENDING

The reassignment of ownership of the group is in progress.

Remarks

The return value from the MoveClusterGroup function does not imply anything about the state of the group or any of its resources. The return value only indicates whether the change of ownership was successful. After returning from MoveClusterGroup, the cluster always attempts to return the group to the state it was before the move.

If you want your application to ensure a particular state for a resource or a group after a move:

  1. Check the state prior to the move. The cluster will attempt to restore that state after the move.
  2. Poll for the state after the move and adjust as necessary. Or create a notification port (see Receiving Cluster Events) and wait for a CLUSTER_CHANGE_GROUP_STATE event.

When hDestinationNode is set to NULL, MoveClusterGroup attempts to move the group to the best possible node. If there is no node available that can accept the group, the function fails. MoveClusterGroup also fails if MoveClusterGroup determines that the group cannot be brought online on the node identified by the hDestinationNode parameter.

Do not call MoveClusterGroup from a resource DLL. For more information, see Function Calls to Avoid in Resource DLLs.

Do not pass LPC and RPC handles to the same function call. Otherwise, the call will raise an RPC exception and can have additional destructive effects. For information on how LPC and RPC handles are created, see Using Object Handles and OpenCluster.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 Enterprise, Windows Server 2008 Datacenter

Header

ClusAPI.h

Library

ClusAPI.lib

DLL

ClusAPI.dll

See also

OpenClusterGroup
OpenClusterNode
OpenCluster

 

 

Show: