This procedure explains the steps to register and configure HA for Oracle Database with clustered Oracle ASM instance using Oracle Solaris Cluster maintenance commands.
You can optionally use a third-party volume manager to provide candidate disks to clustered Oracle ASM disk groups. For this type of configuration, this procedure manually creates an Oracle Grid Infrastructure resource that proxies the Oracle Solaris Cluster SUNW.ScalDeviceGroup resource. In this procedure, the Oracle Grid Infrastructure resource is named sun.resource. You configure sun.resource to ensure that the corresponding Oracle ASM disk group is not mounted until sun.resource is online. The sun.resource resource comes online only if the corresponding SUNW.ScalDeviceGroup resource is online. And the SUNW.ScalDeviceGroup resource only comes online if the actual volume-manager disk set or disk group is online.
To ensure that the Oracle ASM disk group benefits from this dependency chain, after you define sun.resource, you modify the appropriate Oracle ASM disk-group resource so that the hard-start dependency includes sun.resource. Modifying the hard-start dependency of the Oracle ASM disk-group resource can only be performed by the SUNW.scalable_asm_diskgroup_proxy resource by using the VALIDATE method. Therefore, you must set an offline-restart dependency between the SUNW.scalable_asm_diskgroup_proxy and SUNW.ScalDeviceGroup resources.
Before You Begin
Ensure that the /etc/netmasks file has IP-address subnet and netmask entries for all logical hostnames. If necessary, edit the /etc/netmasks file to add any missing entries.
If you are using Solaris Volume Manager for Sun Cluster for volume management, configure a multi-owner disk set for clustered Oracle ASM to use. Follow procedures in How to Create a Multi-Owner Disk Set in Solaris Volume Manager for Sun Cluster for the Oracle RAC Database in Oracle Solaris Cluster Data Service for Oracle Real Application Clusters Guide .
Ensure that Oracle Grid Infrastructure software is installed.
Ensure that the Oracle Clusterware resource for the Oracle ASM instance and the database instance are configured.
Ensure that the file system you will use for Oracle_Home is set up. See Preparing the Oracle Solaris Cluster Nodes and Disks for instructions.
Oracle ASM candidate disks can be derived from any of the following:
Solaris Volume Manager disk sets
NFS
# /Grid_home/bin/crsctl add type sun.storage_proxy.type -basetype local_resource
# /Grid_home/bin/crsctl add res sun.scal-asmdg1-rs \ -type sun.storage_proxy.type \ -attr "ACTION_SCRIPT='/opt/SUNWscor/dsconfig/bin/scproxy_crs_action' \ ACL='owner:root:rwx,pgrp:oinstall:rwx,other::r--' SCRIPT_TIMEOUT='20' RESTART_ATTEMPTS='60'"
The SUNW.ScalDeviceGroup resource name.
Specifies the sun.storage_proxy.type resource type.
Specifies the /opt/SUNWscor/dsconfig/bin/scproxy_crs_action action script.
Sets the owner equal to root and the group equal to the ACL group entry for the Oracle ASM disk group. The following command displays the ACL group entry:
# /Grid_home/bin/crsctl stat res ora.DATA1.dg -p | grep ACL= ACL=owner:oragrid:rwx,pgrp:oinstall:rwx,other::r--
The example output shows that oinstall is the group entry.
Set to 20.
Set to 60.
Output is similar to the following:
# /Grid_home/bin/crsctl stat res sun.scal-asmdg1-rs -p NAME=sun.scal-asmdg1-rs TYPE=sun.storage_proxy.type ACL=owner:root:rwx,pgrp:oinstall:rwx,other::r-- ACTIONS= ACTION_FAILURE_TEMPLATE= ACTION_SCRIPT=/opt/SUNWscor/dsconfig/bin/scproxy_crs_action ACTION_TIMEOUT=60 AGENT_FILENAME=%CRS_HOME%/bin/scriptagent ALERT_TEMPLATE= ALIAS_NAME= AUTO_START=restore CHECK_INTERVAL=60 CHECK_TIMEOUT=0 CLEAN_TIMEOUT=60 DEBUG=1 DEFAULT_TEMPLATE= DEGREE=1 DELETE_TIMEOUT=60 DESCRIPTION= ENABLED=1 INSTANCE_FAILOVER=1 INTERMEDIATE_TIMEOUT=- LOAD=1 LOGGING_LEVEL=1 MODIFY_TIMEOUT=60 NOT_RESTARTING_TEMPLATE= OFFLINE_CHECK_INTERVAL=0 PROFILE_CHANGE_TEMPLATE= RESTART_ATTEMPTS=60 SCRIPT_TIMEOUT=20 SERVER_CATEGORY= START_CONCURRENCY=0 START_DEPENDENCIES= START_TIMEOUT=0 STATE_CHANGE_TEMPLATE= STOP_CONCURRENCEY=0 STOP_DEPENDENCIES= STOP_TIMEOUT=0 UPTIME_THRESHOLD=1h USER_WORKLOAD=no #
# /Grid_home/bin/crsctl stat res ora.DATA1.dg -p | grep START_DEPENDENCIES START_DEPENDENCIES=hard(ora.asm) pullup(ora.asm) # clresource show -p Resource_dependencies_offline_restart asm-data1-rs === Resources === Resource: asm-data1-rs Resource_dependencies_offline_restart: asm-inst-rs -- Standard and extension properties --
Note that the command includes the plus (+) symbol:
# clresource set -p Resource_dependencies_offline_restart+=scal-asmdg1-rs asm-data1-rs
(For an Oracle ASM device group only) Sets the offline restart dependency for the specified Oracle ASM storage resource.
Specifies the name of the resource that you are modifying.
# clresource create -g asm-dg-rg \ -t SUNW.scalable_asm_diskgroup_proxy \ -p asm_diskgroups=data1 \ -p Resource_dependencies_offline_restart=asm-inst-rs, scal-asmdg1-rs \ -d asm-data1-rs
Specifies the name of the Oracle ASM device group into which the resources are to be placed.
Specifies the type of the resource to add.
Sets the name of the Oracle ASM disk group.
Specifies disabling the resource that you create.
# /Grid_home/bin/crsctl stat res ora.DATA1.dg -p | grep START_DEPENDENCIES START_DEPENDENCIES=hard(ora.asm,sun.scal-asmdg1-rs) pullup(ora.asm) # clresource show -p Resource_dependencies_offline_restart asm-data1-rs === Resources === Resource: asm-data1-rs Resource_dependencies_offline_restart: asm-inst-rs scal-asmdg1-rs -- Standard and extension properties --
# clresourcetype register SUNW.crs_framework
# clresource create -g rac-fmwk-rg \ -t SUNW.crs_framework \ -p Resource_dependencies_offline_restart=rac-fmwk-rs \ -d crs-fmwk-rs
# clresourcegroup create ora-db-rg
# clresourcetype register SUNW.qfs
# clresourcegroup create qfs-rg
# clresource create -g qfs-rg -t SUNW.qfs -p QFSFileSystem=qfs-mp qfs-rs
Specifies the name of the resource group.
Specifies the type of the resource to add.
Specifies the Sun QFS file system mount point.
Specifies the name of the Sun QFS file system resource that you are creating.
# clresourcegroup online -eM qfs-rg
# clresourcetype register SUNW.HAStoragePlus
# clresource create -g ora-db-rg -t SUNW.HAStoragePlus \ -p filesystemmountpoints=mount-point-list -d hastp-rs
# clresourcegroup online -eM ora-db-rg
# clresourcetype register SUNW.scalable_asm_instance_proxy
# clresourcetype register SUNW.scalable_asm_diskgroup_proxy
# clresourcegroup create -S asm-inst-rg asm-dg-rg
# clresourcegroup set -p Rg_affinities=++rac-fmwk-rg asm-inst-rg
# clresourcegroup set -p Rg_affinities=++asm-inst-rg asm-dg-rg
# clresource create -g rac-fmwk-rg \ -t SUNW.crs_framework \ -p Resource_dependencies_offline_restart=rac-fmwk-rs \ -d crs-fmwk-rs
Add resources of type SUNW.HAStoragePlus and SUNW.scalable_asm_instance to the asm-inst-rg resource group and set the appropriate dependencies between the two resources.
# clresource create -g asm-inst-rg -t SUNW.HAStoragePlus \ -p FilesystemMountPoints=cluster-file-system \ hastp-rs # clresource create -g asm-inst-rg -t SUNW.scalable_asm_instance_proxy \ -p Oracle_home=Oracle_home \ -p CRS_HOME=Grid_home -p Oracle_sid{node1}=instance \ -p Oracle_sid{node2}=instance \ -p Resource_dependencies_offline_restart=hastp-rs \ -p Resource_dependencies_offline_restart=crs-fmwk-rs \ asm-inst-rs
Specifies the names of the resource groups into which the resources are to be placed.
Specifies the name of the cluster file system.
Specifies the name of the SUNW.HAStoragePlus resource to create.
Sets the path to the Oracle Database home directory.
Sets the path to the Oracle Grid Infrastructure for a Cluster home directory.
Sets the Oracle Database system identifier.
# clresource create -g asm-inst-rg \ -t SUNW.scalable_asm_instance_proxy \ -p Oracle_home=Oracle_home \ -p CRS_HOME=Grid_home \ -p "oracle_sid{node1}"=instance \ -p "oracle_sid{node2}"=instance \ -p Resource_dependencies_offline_restart=crs-fmwk-rs \ -d asm-inst-rs
Specifies the type of the resource to add.
Specifies the name of the resource that you are creating.
Use the SUNW.scalable_asm_diskgroup_proxy resource type.
# clresource create -g asm-dg-rg \ -t SUNW.scalable_asm_diskgroup_proxy \ -p Asm_diskgroups=dg[,dg…] \ -p Resource_dependencies_offline_restart=asm-inst-rs,asm-stor-rs \ -d asm-dg-rs
# clresourcegroup online -eM asm-inst-rg
# clresourcegroup online -eM asm-dg-rg
# clresource status +
You register two resource types, SUNW.oracle_server and SUNW.oracle_listener.
# clresourcetype register SUNW.oracle_server # clresourcetype register SUNW.oracle_listener
# clreslogicalhostname create -g ora-db-rg [-h logical-hostname] logical-hostname-rs
Specifies a logical hostname. This logical hostname must be present in your name service database. If logical-hostname and logical-hostname-rs are identical, logical-hostname is optional.
Specifies the name that you are assigning to the logical hostname resource that you are creating.
# clresourcegroup online -eM ora-db-rg
# clresource create -g ora-db-rg \ -t SUNW.oracle_server \ -p Db_unique_home=db-unique-home \ -p Resource_dependencies_offline_restart=asm-dg-rs \ -p Oracle_sid=instance \ -d ora-db-rs
Specifies the name of the resource group into which the resources are to be placed.
Specifies the type of the resource to add.
Sets the Oracle Database system identifier.
Sets the Oracle Database unique name.
Specifies the name of the resource that you are creating.
# clresource enable ora-db-rs
Next Steps
Go to Verifying the HA for Oracle Database Installation after you register and configure HA for Oracle Database.