This procedure provides the long forms of the Sun Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix A, Sun Cluster Object-Oriented Commands, in Sun Cluster 3.1 - 3.2 Hardware Administration Manual for Solaris OS
Ensure that the following prerequisites are met:
The volume manager of the cluster is configured to provide volumes on shared storage that are accessible from any node where Oracle could potentially run.
Raw devices and file systems on the storage volumes that Oracle will use for its database are created.
The Oracle software is installed to be accessible from all nodes or zones where Oracle could potentially run.
Kernel variables for the UNIX operating system are configured for Oracle.
The Oracle software is configured for all nodes or zones that could potentially run Oracle.
The data service packages are installed.
Ensure that you have the following information:
The names of the cluster nodes or zones that master the data service.
The logical hostname that clients use to access the data service. Normally, you set up this IP address when you install the cluster. See the Sun Cluster Concepts Guide for Solaris OS for details about network resources.
The path to the Oracle application binaries for the resources that you plan to configure.
The database type.
On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorizations.
Register the resource types for the data service.
For Sun Cluster HA for Oracle, you register two resource types, SUNW.oracle_server and SUNW.oracle_listener, as follows.
# clresourcetype register SUNW.oracle_server # clresourcetype register SUNW.oracle_listener |
Create a failover resource group to hold the network and application resources.
This step is not required if you use the Solaris ZFS, because the resource group was created when the highly available local ZFS was configured. The resources that are created in other steps in this procedure are to be added to this resource group.
You can optionally select the set of nodes or zones on which the data service can run with the -n option, as follows.
# clresourcegroup create [-n node-zone-list] resource-group |
Specifies a comma-separated, ordered list of zones that can master this resource group. The format of each entry in the list is node:zone. In this format, node specifies the name or ID of a node and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.
The order in this list determines the order in which the nodes or zones are considered primary during failover. This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.
Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.
Verify that all of the network resources that you use have been added to your name service database.
You should have performed this verification during the Sun Cluster installation.
Ensure that all of the network resources are present in the server's and client's /etc/inet/hosts file to avoid any failures because of name service lookup.
Add a logical hostname resource to the failover resource group.
# clreslogicalhostname create -g resource-group [-h logicalhostname] logicalhotname-rs |
Specifies a logical hostname. This logical hostname must present in your name service database. If logicalhostname and logicalhostname-rs are identical, logicalhostname is optional.
Specifies the name that you are assigning to the logical hostname resource that you are creating.
Register the SUNW.HAStoragePlus resource type with the cluster.
# clresourcetype register SUNW.HAStoragePlus |
Add a resource of type SUNW.HAStoragePlus to the failover resource group.
Non-global zones do not support raw devices.
The SUNW.HAStoragePlus resource type must be version 4 if it is to be supported in non-global zones.
If you use the Solaris ZFS for Oracle files, omit this step. The SUNW.HAStoragePlus resource was created when the highly available local ZFS was configured. For more information, see How to Prepare the Nodes.
# clresource create -g resource-group -t SUNW.HAStoragePlus \ -p GlobalDevicePaths=device-path \ -p FilesystemMountPoints=mount-point-list \ -p AffinityOn=TRUE hastp-rs |
You must set either the GlobalDevicePaths extension property or the FilesystemMountPoints extension property:
If your database is on a raw device, set the GlobalDevicePaths extension property to the global device path.
If your database is on the cluster file system, specify mount points of the cluster file system and the local file system.
AffinityOn must be set to TRUE and the local file system must reside on global disk groups to be failover.
The resource is created in the enabled state.
Bring online the failover resource group in a managed state on a cluster node or zone.
# clresourcegroup online -M resource-group |
Places the resource group that is brought online in a managed state.
Create Oracle application resources in the failover resource group.
Oracle server resource:
# clresource create -g resourcegroup \ -t SUNW.oracle_server \ -p Connect_string=user/passwd \ -p ORACLE_SID=instance \ -p ORACLE_HOME=Oracle-home \ -p Alert_log_file=path-to-log \ -p Restart_type=entity-to-restart \ [-p Dataguard_role=role] \ [-p Standby_mode=mode] \-p resource_dependencies=storageplus-resource \ resource |
Oracle listener resource:
# clresource create -g resource-group \ -t SUNW.oracle_listener \ -p LISTENER_NAME=listener \ -p ORACLE_HOME=Oracle-home \ -p resource_dependencies=storageplus-resource resource |
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 path under $ORACLE_HOME for the server message log.
Specifies the user and password that the fault monitor uses to connect to the database. These settings must agree with the permissions that you set up in How to Set Up Oracle Database Permissions. If you use Solaris authorization, type a slash (/) instead of the user name and password.
Sets the Oracle system identifier.
Sets the name of the Oracle listener instance. This name must match the corresponding entry in listener.ora.
Sets the path to the Oracle home directory.
Specifies the entity that the server fault monitor restarts when the response to a fault is restart. Set entity-to-restart as follows:
To specify that only this resource is restarted, set entity-to-restart to RESOURCE_RESTART. By default, only this resource is restarted.
To specify that all resources in the resource group that contains this resource are restarted, set entity-to-restart to RESOURCE_GROUP_RESTART.
If you set entity-to-restart to RESOURCE_GROUP_RESTART, all other resources (such as Apache or DNS) in the resource group are restarted, even if they are not faulty. Therefore, include in the resource group only the resources that you require to be restarted when the Oracle server resource is restarted.
Specifies the role of the database instance. Change role as follows:
To create a resource for a primary database instance that does not have standby instances configured, change role to NONE. This value is the default value.
To create a resource for a primary database instance that has standby database instances configured, change role to PRIMARY.
To create a resource for a standby database instance, change role to STANDBY.
Specifies the mode for the standby database instance. If you change Dataguard_role to NONE or PRIMARY, the value of the Standby_mode is ignored.
To specify a logical standby database, change mode to LOGICAL. This value is the default value.
To specify a physical standby database, change mode to PHYSICAL.
Specifies the name of the resource that you are creating.
Optionally, you can set additional extension properties that belong to the Oracle data service to override their default values. See Setting Sun Cluster HA for Oracle Extension Properties for a list of extension properties.
The resources are created in the enabled state.
The following example shows how to register Sun Cluster HA for Oracle on a two-node cluster.
Cluster Information Node names: phys-schost-1, phys-schost-2 Logical Hostname: schost-1 Resource group: resource-group-1 (failover resource group) HAStoragePlus Resource: hastp-rs Oracle Resources: oracle-server-1, oracle-listener-1 Oracle Instances: ora-lsnr (listener), ora-srvr (server) (Create the failover resource group to contain all of the resources.) # clresourcegroup create resource-group-1 (Add the logical hostname resource to the resource group.) # clreslogicalhostname create -g resource-group-1 schost-1 (Register the SUNW.HAStoragePlus resource type.) # clresourcetype register SUNW.HAStoragePlus (Add a resource of type SUNW.HAStoragePlus to the resource group.) # clresource create -g resource-group-1 -t SUNW.HAStoragePlus \ -p FileSystemMountPoints=/global/ora-inst,/global/ora-data/logs,local/ora-data -p AffinityOn=TRUE hastp-rs (Bring the resource group online in a managed state # clresourcegroup online -M resource-group-1 (Register the Oracle resource types.) # clresourcetype register SUNW.oracle_server # clresourcetype register SUNW.oracle_listener (Add the Oracle application resources to the resource group.) # clresource create -g resource-group-1 \ -t SUNW.oracle_server -p ORACLE_HOME=/global/oracle \ -p Alert_log_file=/global/oracle/message-log \ -p ORACLE_SID=ora-srvr -p Connect_string=scott/tiger \ -p Dataguard_role=STANDBY -p Standby_mode=PHYSICAL oracle-server-1 # clresource create -g resource-group-1 \ -t SUNW.oracle_listener -p ORACLE_HOME=/global/oracle \ -p LISTENER_NAME=ora-lsnr oracle-listener-1 |
The following example shows how to register Sun Cluster HA for Oracle on a two-node cluster.
Cluster Information Node names: phys-schost-1, phys-schost-2 Non-global zone names: sc1zone1, sc2zone1 Logical Hostname: schost-1 Resource group: resource-group-1 (failover resource group) HAStoragePlus Resource: hastp-rs Oracle Resources: oracle-server-1, oracle-listener-1 Oracle Instances: ora-lsnr (listener), ora-srvr (server) (Create the failover resource group to contain all of the resources.) # clresourcegroup create phys-schost-1:sc1zone1,phys-schost-2:sc2zone1 resource-group-1 (Add the logical hostname resource to the resource group.) # clreslogicalhostname create -g resource-group-1 schost-1 (Register the SUNW.HAStoragePlus resource type.) # clresourcetype register SUNW.HAStoragePlus (Add a resource of type SUNW.HAStoragePlus to the resource group.) # clresource create -g resource-group-1 -t SUNW.HAStoragePlus \ -p FileSystemMountPoints=/global/ora-inst,/global/ora-data/logs,local/ora-data -p AffinityOn=TRUE hastp-rs (Bring the resource group online in a managed state # clresourcegroup online -M resource-group-1 (Register the Oracle resource types.) # clresourcetype register SUNW.oracle_server # clresourcetype register SUNW.oracle_listener (Add the Oracle application resources to the resource group.) # clresource create -g resource-group-1 \ -t SUNW.oracle_server -p ORACLE_HOME=/global/oracle \ -p Alert_log_file=/global/oracle/message-log \ -p ORACLE_SID=ora-srvr -p Connect_string=scott/tiger \ -p Dataguard_role=STANDBY -p Standby_mode=PHYSICAL oracle-server-1 # clresource create -g resource-group-1 \ -t SUNW.oracle_listener -p ORACLE_HOME=/global/oracle \ -p LISTENER_NAME=ora-lsnr oracle-listener-1 |