Sun Cluster 3.0 U1 Data Services Installation and Configuration Guide

How to Remove a Resource Group

  1. Become superuser on a cluster member.

  2. Run the following command to take the resource group offline.


    # scswitch -F -g resource-group
    
    -F

    Switches a resource group offline.

    -g resource-group

    Specifies the name of the resource group to take offline.

  3. Disable all the resources that are part of the resource group.

    You can use the scrgadm -pv command to view the resources in the resource group. Disable all the resources in the resource group to be removed.


    # scswitch -n -j resource
    
    -n

    Disables the resource.

    -j resource

    Specifies the name of the resource to disable.

    If any dependent data-service resources exist in a resource group, you cannot disable the resource until you have disabled all the resources that depend on it.

  4. Remove all resources from the resource group.

    Use the following scrgadm commands to perform the following tasks.

    • Remove the resources.

    • Remove the resource group.


    # scrgadm -r -j resource
    # scrgadm -r -g resource-group
    
    -r

    Removes the specified resource or resource group.

    -j resource

    Specifies the name of the resource to be removed.

    -g resource-group

    Specifies the name of the resource group to be removed.

  5. Verify that the resource group has been removed.


    # scrgadm -p
    

Example - Removing a Resource Group

This example shows how to remove a resource group (resource-group-1) after you have removed its resource (resource-1).


# scswitch -F -g resource-group-1
# scrgadm -r -j resource-1
# scrgadm -r -g resource-group-1