Sun Cluster 3.1 Data Service Planning and Administration Guide

How to Switch the Current Primary of a Resource Group

To complete this procedure, you must supply the following information.

  1. Become superuser on a cluster member.

  2. Switch the primary to a potential primary.


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

    Switches the specified resource group online.

    -g resource-group

    Specifies the name of the resource group to switch.

    -h nodelist

    Specifies the node or nodes on which the resource group is to be brought online or is to remain online. This resource group is then switched offline on all of the other nodes.

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

    Run the following command, and check the output for the state of the resource group that has been switched over.


    # scstat -g
    

Example – Switching the Resource Group to a New Primary

This example shows how to switch a resource group (resource-group-1) from its current primary (phys-schost-1) to the potential primary (phys-schost-2). First, verify that the resource group is online on phys-schost-1. Next, perform the switch. Finally, verify that the group is switched to be online on phys-schost-2.


phys-schost-1# scstat -g
...
Resource Group Name:          resource-group-1
  Status                                           
    Node Name:                phys-schost-1
    Status:                   Online

    Node Name:                phys-schost-2
    Status:                   Offline
...
phys-schost-1# scswitch -z -g resource-group-1 -h phys-schost-2
phys-schost-1# scstat -g
...
Resource Group Name:          resource-group-1
  Status                                           
    Node Name:                phys-schost-2
    Status:                   Online

    Node Name:                phys-schost-1
    Status:                   Offline
...