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 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:


# scrgadm -pv
Steps
  1. On a cluster member, become superuser or assume an equivalent role.

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


    # scswitch -z -g resource-group -h nodelist
    
    -z

    Switches the specified resource group to a new set of primaries.

    -g resource-group

    Specifies the name of the resource group to switch.

    -h nodelist

    Specifies a comma-separated list of the names of the nodes on which the resource group is to be brought online or is to remain online. The list may contain one node name or more than one node name. This resource group is switched offline on all of the other nodes.


    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.


    # scstat -g
    

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# scstat -g
    ...-- Resource Groups --
    
                Group Name          Node Name           State
                ----------          ---------           -----
         Group: resource-group-1    phys-schost-1       Online
         Group: resource-group-1    phys-schost-2       Offline...
  2. To perform the switch, the following command is run:


    phys-schost-1# scswitch -z -g resource-group-1 -h phys-schost-2
    
  3. To verify that the group is switched to be online on phys-schost-2, the following command is run:


    phys-schost-1# scstat -g
    ...-- Resource Groups --
    
                Group Name          Node Name           State
                ----------          ---------           -----
         Group: resource-group-1    phys-schost-1       Offline
         Group: resource-group-1    phys-schost-2       Online...

See Also

The following man pages: