Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Switching the Current Primary of a Resource Group

Use the following procedure to switch over a resource group from its current primary to another node or zone that is to become the new primary.

ProcedureHow to Switch the Current Primary of a Resource Group


Note –

Perform this procedure from any cluster node.


Before You Begin

Ensure that the following conditions are met:

To see a list of potential primaries for the resource group, type the following command:


# clresourcegroup show -v
  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Switch the resource group to a new set of primaries.


    # clresourcegroup switch [-n node-zone-list] resource-group
    
    -n node-zone-list

    Specifies a comma-separated, ordered list of zones that can master this resource group. The resource group is switched offline on all of the other nodes. The format of each entry in the list is node:zone. In this format, node specifies the node name and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.

    This list is optional. If you omit this list, the resource group is switched on all nodes in the resource group's node list.

    resource-group

    Specifies the name of the resource group to switch.


    Note –

    If any resource group that you are switching declares a strong affinity for other resource groups, the attempt to switch might fail or be delegated. For more information, see Distributing Online Resource Groups Among Cluster Nodes.


  3. Verify that the resource group has been switched to the new primary.

    The output from this command indicates the state of the resource group that has been switched over.


    # clresourcegroup status 
    

Example 2–17 Switching a Resource Group to a New Primary

This example shows how to switch the resource group resource-group-1 from its current primary phys-schost-1 to the potential primary phys-schost-2.

  1. To verify that the resource group is online on phys-schost-1, the following command is run:


    phys-schost-1# clresourcegroup status 
                
    === Cluster Resource Groups ===
    
        Group Name                   Node Name          Suspended        Status
        ----------                   ---------          ---------         ------
    
    resource-group1                phys-schost-1             No           Online
                                   phys-schost-2             No           Offline
  2. To perform the switch, the following command is run:


    phys-schost-1# clresourcegroup switch -n phys-schost-2 resource-group-1
    
  3. To verify that the group is switched to be online on phys-schost-2, the following command is run:


    phys-schost-1# clresourcegroup status 
               
    === Cluster Resource Groups ===
    
        Group Name                   Node Name          Suspended        Status
        ----------                   ---------          ---------         ------
    
    resource-group1                phys-schost-1             No           Offline
                                   phys-schost-2             No           Online

See Also

The clresourcegroup(1CL) page.