Sun Cluster Data Service for Oracle Real Application Clusters Guide for Solaris OS

Creating, Modifying, and Removing the RAC Framework Resource Group by Using the scrgadm Utility

The scrgadm utility enables you to automate the creation, modification, and removal of the RAC framework resource group by using scripts. Automating this process reduces the time for propagating the same configuration information to many nodes in a cluster.


Note –

For procedures that explain how to create, modify, or remove the RAC framework resource by using the scsetup utility, see Registering and Configuring the RAC Framework Resource Group and Removing Sun Cluster Support for Oracle Real Application Clusters. Using the scsetup utility reduces the possibility for configuration errors that might result from command syntax errors or omissions.


How to Create the RAC Framework Resource Group by Using the scrgadm Utility

  1. On one node of the cluster, become superuser.

  2. Create a scalable resource group.


    # scrgadm -a -g resource-group \
      -y nodelist=nodelist \
      -y maximum_primaries=num-in-list \
      -y desired_primaries=num-in-list \
      -y RG_mode=Scalable
    
    -g resource-group

    Specifies the name that you are assigning to the resource group.

    -y nodelist=nodelist

    Specifies a comma-separated list of cluster nodes on which Sun Cluster Support for Oracle Real Application Clusters is to be enabled. The Sun Cluster Support for Oracle Real Application Clusters software packages must be installed on each node in this list.

    -y maximum_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle Real Application Clusters is to be enabled. This number must equal the number of nodes in nodelist.

    -y desired_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle Real Application Clusters is to be enabled. This number must equal the number of nodes in nodelist.

    -y RG_mode=Scalable

    Specifies that the resource group is scalable.

  3. Register the SUNW.rac_framework resource type.


    # scrgadm -a -t SUNW.rac_framework
    
  4. Add an instance of the SUNW.rac_framework resource type to the resource group that you created in Step 2.


    # scrgadm -a -j fmwk-resource \
      -g resource-group \
      -t SUNW.rac_framework
    
    -j fmwk-resource

    Specifies the name that you are assigning to the SUNW.rac_framework resource.

    -g resource-group

    Specifies the resource group to which you are adding the resource. This resource group must be the resource group that you created in Step 2.

  5. Register the SUNW.rac_udlm resource type.


    # scrgadm -a -t SUNW.rac_udlm
    
  6. Add an instance of the SUNW.rac_udlm resource type to the resource group that you created in Step 2.

    Ensure that this instance depends on the SUNW.rac_framework resource that you created in Step 4.


    # scrgadm -a -j udlm-resource \
      -g resource-group \
      -t SUNW.rac_udlm \
      -y resource_dependencies=fmwk-resource
    
    -j udlm-resource

    Specifies the name that you are assigning to the SUNW.rac_udlm resource.

    -g resource-group

    Specifies the resource group to which you are adding the resource. This resource group must be the resource group that you created in Step 2.

    -y resource_dependencies=fmwk-resource

    Specifies that this instance depends on the SUNW.rac_framework resource that you created in Step 4.

  7. Register and add instances of the resource types that are required for the storage management scheme that you are using for the Oracle Real Application Clusters database.

    • If you are using Solaris Volume Manager for Sun Cluster, register and add an instance of the SUNW.rac_svm resource type to the resource group that you created in Step 2.

      Ensure that this instance depends on the rac_framework resource that you created in Step 4.


      # scrgadm -a -t SUNW.rac_svm
      

      # scrgadm -a -j svm-resource \
        -g resource-group \
        -t SUNW.rac_svm \
        -y resource_dependencies=fmwk-resource
      
      -j svm-resource

      Specifies the name that you are assigning to the SUNW.rac_svm resource.

      -g resource-group

      Specifies the resource group to which you are adding the resource. This resource group must be the resource group that you created in Step 2.

      -y resource_dependencies=fmwk-resource

      Specifies that this instance depends on the SUNW.rac_framework resource that you created in Step 4.

    • If you are using VxVM with the cluster feature, register and add an instance of the SUNW.rac_cvm resource type to the resource group that you created in Step 2.

      Ensure that this instance depends on the rac_framework resource that you created in Step 4.


      # scrgadm -a -t SUNW.rac_cvm
      

      # scrgadm -a -j cvm-resource \
        -g resource-group \
        -t SUNW.rac_cvm \
        -y resource_dependencies=fmwk-resource
      
      -j cvm-resource

      Specifies the name that you are assigning to the SUNW.rac_cvm resource.

      -g resource-group

      Specifies the resource group to which you are adding the resource. This resource group must be the resource group that you created in Step 2.

      -y resource_dependencies=fmwk-resource

      Specifies that this instance depends on the SUNW.rac_framework resource that you created in Step 4.

    • If you are using hardware RAID support, register and add an instance of the SUNW.rac_hwraid resource type to the resource group that you created in Step 2.

      Ensure that this instance depends on the rac_framework resource that you created in Step 4.


      # scrgadm -a -t SUNW.rac_hwraid
      

      # scrgadm -a -j raid-resource \
        -g resource-group \
        -t SUNW.rac_hwraid \
        -y resource_dependencies=fmwk-resource 
      
      -j raid-resource

      Specifies the name that you are assigning to the SUNW.rac_hwraid resource.

      -g resource-group

      Specifies the resource group to which you are adding the resource. This resource group must be the resource group that you created in Step 2.

      -y resource_dependencies=fmwk-resource

      Specifies that this instance depends on the SUNW.rac_framework resource that you created in Step 4.

    • If you are using Sun StorEdge QFS shared file system with hardware RAID support, you must register and add an instance of the resource type for hardware RAID support.

      No resource instance that represents Sun StorEdge QFS shared file system is required in the RAC framework resource group. Although a resource that represents each Sun StorEdge QFS shared file system is required, these resources are not contained in the RAC framework resource group. For information about these resources, see Configuration Planning Questions.

  8. Bring the RAC framework resource group and its resources online.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the resource and monitor, moves the resource group to the MANAGED state, and brings the resource group online

    -g resource-group

    Specifies that the resource group that you created in Step 2 is to be moved to the MANAGED state and brought online

How to Add Nodes to the RAC Framework Resource Group by Using the scrgadm Utility

This procedure assumes that a RAC framework resource group has already been created for the cluster.

  1. On one node of the cluster, become superuser.

  2. For the RAC framework resource group, specify a node list that contains the following nodes:

    • The nodes on which Sun Cluster Support for Oracle Real Application Clusters is already enabled.

    • The nodes that you are adding to the RAC framework resource group.


    # scrgadm -c -g resource-group \
      -y nodelist=nodelist \
      -y maximum_primaries=num-in-list \
      -y desired_primaries=num-in-list 
    
    -g resource-group

    Specifies the name of the RAC framework resource group to which you are adding nodes. If this resource group was created by using the scsetup utility, the name of the resource group is rac-framework-rg.

    -y nodelist=nodelist

    Specifies a comma-separated list of cluster nodes on which Sun Cluster Support for Oracle Real Application Clusters is already enabled and the nodes that you are adding to the RAC framework resource group. The Sun Cluster Support for Oracle Real Application Clusters software packages must be installed on each node in this list.

    -y maximum_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle Real Application Clusters is to be enabled. This number must equal the number of nodes in nodelist.

    -y desired_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle Real Application Clusters is to be enabled. This number must equal the number of nodes in nodelist.

  3. Bring the RAC framework resource group and its resources online.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the resource and monitor, moves the resource group to the MANAGED state, and brings the resource group online.

    -g resource-group

    Specifies the name of the RAC framework resource group that is to be moved to the MANAGED state and brought online. If this resource group was created by using the scsetup utility, the name of the resource group is rac-framework-rg.

How to Remove the RAC Framework Resource Group by Using the scrgadm Utility

The resources that the RAC framework resource group contains are described in Overview of the RAC Framework Resource Group. If the RAC framework resource group is created by using the scsetup utility, scsetup assigns names to the resources as listed in Table 2–3.

Table 2–3 Names Assigned to RAC Framework Resources by scsetup

Resource Type 

Resource Name 

SUNW.rac_svm

rac_svm

SUNW.rac_cvm

rac_cvm

SUNW.rac_hwraid

rac_hwraid

SUNW.rac_udlm

rac_udlm

SUNW.rac_framework

rac_framework

  1. On one node of the cluster, become superuser.

  2. Remove all RAC server resource groups in the cluster.

    These resource groups were created as explained in How to Register and Configure Oracle RAC Server Resources.

    Remove each RAC server resource group as follows:

    1. Disable each RAC server resource in the resource group.

      For each resource, type the following command:


      # scswitch -n -j resource
      
      -j resource

      Specifies the resource that you are disabling

    2. Remove each RAC server resource in the resource group.

      For each resource, type the following command:


      # scrgadm -r -j resource
      
      -j resource

      Specifies the resource that you are removing

    3. Remove the RAC server resource group.


      # scrgadm -r -g rac-server-rg
      
      -g rac-server-rg

      Specifies the resource group that you are removing

  3. Disable each resource that the RAC framework resource group contains.

    Disable the instance of the SUNW.rac_framework resource only after you have disabled all other resources that the RAC framework resource group contains. The other resources in the RAC framework resource group depend on SUNW.rac_framework.


    # scswitch -n -j resource
    
    -j resource

    Specifies the name of the resource that you are disabling. If this resource was created by using the scsetup utility, the name depends on the resource type as shown in Table 2–3.

  4. Remove each resource that you disabled in Step 3.

    Remove the instance of the SUNW.rac_framework resource only after you have removed all other resources that the RAC framework resource group contains. The other resources in the RAC framework resource group depend on SUNW.rac_framework.


    # scrgadm -r -j resource
    
    -j resource

    Specifies the name of the resource that you are removing. If this resource was created by using the scsetup utility, the name depends on the resource type as shown in Table 2–3.

  5. Unregister the resource type of each resource that you removed in Step 4.


    # scrgadm -r -t resource-type
    
    -t resource-type

    Specifies the name of the resource type that you are unregistering. This resource type was registered for the RAC framework resource group when the resource group was created. The resources that the RAC framework resource group contains are described in Overview of the RAC Framework Resource Group.

  6. Remove the RAC framework resource group.


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

    Specifies the name of the RAC framework resource group that you are removing. If this resource group was created by using the scsetup utility, the name of the resource group is rac-framework-rg.


Note –

After you have removed the RAC framework resource group, you must boot each cluster node in noncluster mode and uninstall the Sun Cluster Support for Oracle Real Application Clusters software packages. For more information, see How to Remove Sun Cluster Support for Oracle Real Application Clusters From a Cluster.



Example 2–6 Removing the RAC Framework Resource Group by Using the scrgadm Utility


# scswitch -n -j RAC1-rs
# scrgadm -r -j RAC1-rs
# scrgadm -r -g RAC1-rg
# scswitch -n -j RAC2-rs
# scrgadm -r -j RAC2-rs
# scrgadm -r -g RAC2-rg
# scswitch -n -j rac_svm
# scswitch -n -j rac_udlm
# scswitch -n -j rac_framework
# scrgadm -r -j rac_svm
# scrgadm -r -j rac_udlm
# scrgadm -r -j rac_framework
# scrgadm -r -t SUNW.rac_svm
# scrgadm -r -t SUNW.rac_udlm
# scrgadm -r -t SUNW.rac_framework
# scrgadm -r -g rac-framework-rg

This example shows the commands that are required to remove a RAC framework resource group that was created by using the scsetup utility. The resource groups RAC1-rg and RAC2-rg are RAC server resource groups that were created as shown in Example 2–1. The cluster from which this resource group is removed uses the Solaris Volume Manager for Sun Cluster.


How to Remove Nodes From the RAC Framework Resource Group by Using the scrgadm Utility

  1. On one node of the cluster, become superuser.

  2. Boot in noncluster mode the nodes from which you are removing Sun Cluster Support for Oracle Real Application Clusters.

  3. For the RAC framework resource group, specify a node list that contains only the nodes that are to remain in the RAC framework resource group.

    This node list must not include the nodes that you are removing.


    # scrgadm -c -g resource-group \
      -y nodelist=nodelist \
      -y maximum_primaries=num-in-list \
      -y desired_primaries=num-in-list 
    
    -g resource-group

    Specifies the name of the RAC framework resource group from which you are removing nodes. If this resource group was created by using the scsetup utility, the name of the resource group is rac-framework-rg.

    -y nodelist=nodelist

    Specifies a comma-separated list of cluster nodes that are to remain in the RAC framework resource group. This node list must not include the nodes that you are removing.

    -y maximum_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle Real Application Clusters is to be enabled. This number must equal the number of nodes in nodelist.

    -y desired_primaries=num-in-list

    Specifies the number of nodes on which Sun Cluster Support for Oracle Real Application Clusters is to be enabled. This number must equal the number of nodes in nodelist.


Note –

After you have removed nodes from the RAC framework resource group, you can optionally uninstall the Sun Cluster Support for Oracle Real Application Clusters software packages from the nodes that you removed. For more information, see How to Remove Sun Cluster Support for Oracle Real Application Clusters From Selected Nodes.