The task in this section is an alternative for the resource-configuration steps in How to Enable Sun Cluster and Oracle 10g R2 CRS to Interoperate
Resources for interoperation with Oracle 10g R2 enable you to administer RAC database instances by using Sun Cluster interfaces. These resources also ensure that dependencies by Oracle CRS resources on Sun Cluster resources are met. These resources enable the high-availability frameworks that are provided by Sun Cluster and Oracle CRS to interoperate.
The following resources for interoperation with Oracle 10g are required:
A Sun Cluster resource to act as a proxy for the Oracle RAC database
A Sun Cluster resource to represent the Oracle CRS framework
Oracle CRS resources to represent scalable device groups
Oracle CRS resources to represent scalable file-system mountpoints
You must assign to an Oracle CRS resource that represents a Sun Cluster resource a name in the following form:
sun.node.sc-rs
Specifies the name of the node where the Oracle CRS resource is to run.
Specifies the name of the Sun Cluster resource that the Oracle CRS resource represents.
For example, the name of the Oracle CRS resource for node pclus1 that represents the Sun Cluster resource scal-dg-rs must be as follows:
sun.pclus1.scal-dg-rs
Perform this procedure on only one node of the cluster.
Become superuser or assume a role that provides solaris.cluster.admin and solaris.cluster.modify RBAC authorizations.
Register the SUNW.crs_framework resource type.
# clresourcetype register SUNW.crs_framework |
Add an instance of the SUNW.crs_framework resource type to the RAC framework resource group.
For information about this resource group, see Registering and Configuring the RAC Framework Resource Group.
Set a strong dependency by the instance of SUNW.crs_framework on the instance of SUNW.rac_framework in the RAC framework resource group.
You might have configured a storage resource for the storage that you are using for database files. In this situation, set an offline-restart dependency by the instance of SUNW.crs_framework on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running.
If you are using a volume manager for database files, set the dependency on the resource that you created in How to Create a Resource for a Scalable Device Group in the Global Cluster.
If you are using a file system for database files, set the dependency on the resource that you created in How to Create a Resource for a File-System Mountpoint in the Global Cluster.
You might have configured a storage resource for the file system that you are using for binary files. In this situation, set an offline-restart dependency by the instance of SUNW.crs_framework on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running. Set the dependency on the resource that you created in How to Create a Resource for a File-System Mountpoint in the Global Cluster.
# clresource create -t SUNW.crs_framework \ -g rac-fmwk-rg \ -p resource_dependencies=rac-fmwk-rs \ [-p resource_dependencies_offline_restart=db-storage-rs{local_node}\ [,bin-storage-rs{local_node}]] \ crs-fmwk-rs |
Create a scalable resource group to contain the proxy resource for the Oracle RAC database server.
Set a strong positive affinity by the scalable resource group for the RAC framework resource group.
You might have configured a storage resource for the storage that you are using for database files. In this situation, set a strong positive affinity by the scalable resource group for the resource group that contains the storage resource for database files.
If you are using a volume manager for database files, set a strong positive for the resource group that you created in How to Create a Resource for a Scalable Device Group in the Global Cluster.
If you are using a file system for database files, set a strong positive affinity for the resource group that you created in How to Create a Resource for a File-System Mountpoint in the Global Cluster.
If you require Sun Cluster Support for Oracle RAC to run on all cluster nodes, specify the -S option in the command that follows and omit the options -n, -p maximum_primaries, -p desired_primaries, and -p rg_mode.
# clresourcegroup create -n nodelist \ -p maximum_primaries=num-in-list \ -p desired_primaries=num-in-list \ -p rg_affinities=++rac-fmwk-rg[,db-storage-rg] \ [-p rg_description="description" \] -p rg_mode=Scalable \ rac-db-rg |
Register the SUNW.scalable_rac_server_proxy resource type.
# clresourcetype register SUNW.scalable_rac_server_proxy |
Add an instance of the SUNW.scalable_rac_server_proxy resource type to the resource group that you created in Step 4.
Set a strong dependency by the instance of SUNW.scalable_rac_server_proxy on the instance of SUNW.rac_framework in the RAC framework resource group.
Set an offline-restart dependency by the instance of SUNW.scalable_rac_server_proxy on the instance of SUNW.crs_framework that you created in Step 3.
You might have configured a storage resource for the storage that you are using for database files. In this situation, set an offline-restart dependency by the instance of SUNW.scalable_rac_server_proxy on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running.
If you are using a volume manager for database files, set the dependency on the resource that you created in How to Create a Resource for a Scalable Device Group in the Global Cluster.
If you are using a file system for database files, set the dependency on the resource that you created in How to Create a Resource for a File-System Mountpoint in the Global Cluster.
Set a different value of the oracle_sid extension property for each node that can master the resource.
# clresource create -g rac-db-rg \ -t SUNW.scalable_rac_server_proxy \ -p resource_dependencies=rac-fmwk-rs \ -p resource_dependencies_offline_restart=crs-fmk-rs[, db-storage-rs] \ -p oracle_home=ora-home \ -p crs_home=crs-home \ -p db_name=db-name \ -p oracle_sid{node1-id}=sid-node1 \ [ -p oracle_sid{node2-id}=sid-node2 \…] rac-srvr-proxy-rs |
Bring online the resource group that you created in Step 4.
# clresourcegroup online -emM rac-db-rg |
Perform this procedure on only one node of the cluster.
When a step in the procedure requires running the Sun Cluster commands in a zone cluster, you should run the command from the global cluster and use the -Z option to specify the zone cluster.
Become superuser or assume a role that provides solaris.cluster.admin and solaris.cluster.modify RBAC authorizations.
Register the SUNW.crs_framework resource type.
# clresourcetype register -Z zcname SUNW.crs_framework |
Add an instance of the SUNW.crs_framework resource type to the RAC framework resource group.
For information about this resource group, see Registering and Configuring the RAC Framework Resource Group.
Set a strong dependency by the instance of SUNW.crs_framework on the instance of SUNW.rac_framework in the RAC framework resource group.
You might have configured a storage resource for the storage that you are using for database files. In this situation, set an offline-restart dependency by the instance of SUNW.crs_framework on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running.
If you are using a volume manager for database files, set the dependency on the resource that you created in How to Create a Resource for a Scalable Device Group in the Global Cluster.
If you are using a file system for database files, set the dependency on the resource that you created in How to Create a Resource for a File-System Mountpoint in Zone Cluster.
You might have configured a storage resource for the file system that you are using for binary files. In this situation, set an offline-restart dependency by the instance of SUNW.crs_framework on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running. Set the dependency on the resource that you created in How to Create a Resource for a File-System Mountpoint in Zone Cluster.
# clresource create -Z zcname -t SUNW.crs_framework \ -g rac-fmwk-rg \ -p resource_dependencies=rac-fmwk-rs \ [-p resource_dependencies_offline_restart=db-storage-rs{local_node} \ [,bin-storage-rs{local_node}]] \ crs-fmwk-rs |
Create a scalable resource group to contain the proxy resource for the Oracle RAC database server.
Set a strong positive affinity by the scalable resource group for the RAC framework resource group.
You might have configured a storage resource for the storage that you are using for database files. In this situation, set a strong positive affinity by the scalable resource group for the resource group that contains the storage resource for database files.
If you are using a volume manager for database files, set a strong positive affinity for the resource group that you created in How to Create a Resource for a Scalable Device Group in the Global Cluster.
If you are using a file system for database files, set a strong positive affinity for the resource group that you created in How to Create a Resource for a File-System Mountpoint in Zone Cluster.
If you require Sun Cluster Support for Oracle RAC to run on all cluster nodes, specify the -S option in the command that follows and omit the options -n, -p maximum_primaries, -p desired_primaries, and -p rg_mode.
# clresourcegroup create -Z zcname -n nodelist \ -p maximum_primaries=num-in-list \ -p desired_primaries=num-in-list \ -p rg_affinities=++rac-fmwk-rg[,db-storage-rg] \ [-p rg_description="description" \] -p rg_mode=Scalable \ rac-db-rg |
Register the SUNW.scalable_rac_server_proxy resource type.
# clresourcetype register -Z zcname SUNW.scalable_rac_server_proxy |
Add an instance of the SUNW.scalable_rac_server_proxy resource type to the resource group that you created in Step 4.
Set a strong dependency by the instance of SUNW.scalable_rac_server_proxy on the instance of SUNW.rac_framework in the RAC framework resource group.
Set an offline-restart dependency by the instance of SUNW.scalable_rac_server_proxy on the instance of SUNW.crs_framework that you created in Step 3.
You might have configured a storage resource for the storage that you are using for database files. In this situation, set an offline-restart dependency by the instance of SUNW.scalable_rac_server_proxy on the storage resource. Limit the scope of this dependency to only the node where the storage resource is running.
If you are using a volume manager for database files, set the dependency on the resource that you created in How to Create a Resource for a Scalable Device Group in the Global Cluster.
If you are using a file system for database files, set the dependency on the resource that you created in How to Create a Resource for a File-System Mountpoint in Zone Cluster.
Set a different value of the oracle_sid extension property for each node that can master the resource.
# clresource create -Z zcname -g rac-db-rg \ -t SUNW.scalable_rac_server_proxy \ -p resource_dependencies=rac-fmwk-rs \ -p resource_dependencies_offline_restart=crs-fmk-rs \ [, db-storage-rs, bin-storage-rs] \ -p oracle_home=ora-home \ -p crs_home=crs-home \ -p db_name=db-name \ -p oracle_sid{node1-id}=sid-node1 \ [ -p oracle_sid{node2-id}=sid-node2 \…] rac-srvr-proxy-rs |
Bring online the resource group that you created in Step 4.
# clresourcegroup online -Z zcname -emM rac-db-rg |
Oracle CRS resources are similar to Sun Cluster resources. Oracle CRS resources represent items that the CRS manage in a similar way to how Sun Cluster resources represent items that the Sun Cluster RGM manages.
Depending on your configuration, some Oracle components that are represented as CRS resources might depend on file systems and global devices that Sun Cluster manages. For example, if you are using file systems and global devices for Oracle files, the Oracle RAC database and the Oracle listener might depend on these file systems and global devices.
Create an Oracle CRS resource for each Sun Cluster resource for scalable device groups and scalable file-system mountpoints on which Oracle components depend. The Oracle CRS resources that you create track the status of their associated Sun Cluster resources. The Oracle CRS resources also ensure the orderly startup of Oracle CRS resources.
Perform this task on each cluster node where Sun Cluster Support for Oracle RAC is to run.
Some steps in this procedure require you to use Oracle CRS commands. In these steps, the syntax of the command for Oracle release 10g R2 is provided. If you are you are using a version of Oracle other than 10g R2, see your Oracle documentation for the correct command syntax.
To create an Oracle CRS resource in a zone cluster, you should perform the steps in this procedure in that zone cluster.
On the node where you are performing this task, global-cluster node for a global cluster or zone-cluster node for a zone cluster, become superuser.
If the /var/cluster/ucmm/profile directory does not exist, create it.
Profiles for CRS resources are created in this directory.
# mkdir -p /var/cluster/ucmm/profile |
Create a profile for the Oracle CRS resource.
# crs-home/bin/crs_profile \ -create sun.node.sc-rs \ -t application -d "description " \ -dir /var/cluster/ucmm/profile \ -a /opt/SUNWscor/dsconfig/bin/scproxy_crs_action \ -p restricted -h node -f -o st=1800 |
Register the Oracle CRS resource for which you created a profile in Step 3.
# crs-home/bin/crs_register sun.node.sc-rs \ -dir /var/cluster/ucmm/profile |
Ensure that the Sun Cluster resource for which the Oracle CRS resource is a proxy is online.
Start the Oracle CRS resource that you registered in Step 4.
# crs-home/bin/crs_start sun.node.sc-rs |
Add the Oracle CRS resource that you registered in Step 4 to the list of resources that the dependent Oracle CRS resource requires.
If the dependent Oracle CRS resource is the Oracle RAC database instance, obtain the name of the instance.
# crs-home/bin/srvctl config database -d db-name | grep node |
Obtain the list of resources that the dependent Oracle CRS resource requires.
# crs-home/bin/crs_stat -p depend-crs-rs | grep REQUIRED_RESOURCES |
Append the name of the Oracle CRS resource to the list that you obtained in Step b.
# crs-home/bin/crs_register depend-crs-rs \ -update -r "existing-list sun.node.sc-rs" |