| United States-English |
|
|
|
![]() |
Using Serviceguard Extension for RAC > Chapter 2 Serviceguard
Configuration for Oracle RACUsing Packages to Configure Startup and Shutdown of RAC Instances |
|
To automate the startup and shutdown of RAC instances on the nodes of the cluster, you can create packages which activate the appropriate volume groups and then run RAC. Refer to the section “Creating Packages to Launch Oracle RAC Instances”
Once the Oracle installation is complete, ensure that all package control scripts are in place on each node and that each /etc/rc.config.d/cmcluster script contains the entry AUTOSTART_CMCLD=1. Then reboot each node. Within a couple of minutes following reboot, the cluster will reform, and the package control scripts will bring up the database instances and application programs. When Oracle has been started, you can use the SAM process management area or the ps -ef command on both nodes to verify that all RAC daemons and Oracle processes are running. To start up and shut down RAC instances without using packages, you can perform the following steps.
If the shutdown sequence described above is not followed, cmhaltcl or cmhaltnode may fail with a message that GMS clients (RAC 9i) are active or that shared volume groups are active. To coordinate the startup and shutdown of RAC instances with cluster node startup and shutdown, you create a one-node package for each node that runs an RAC instance. In the package configuration file, you should specify only the single node on which the instance will run and specify the control script that is to be executed every time the instance node or the entire RAC cluster starts up or shuts down.
To simplify the creation of RAC instance packages, you can use the Oracle template provided with the separately purchasable ECM Toolkits product (B5139BA). This file is found in /opt/cmcluster/tookit/DB/Oracle. Use the special oracle.sh script that is provided, and follow the instructions that appear in the README file. Also refer to the section “Customizing the Control Script for RAC Instances,” below. To create the package with Serviceguard Manager select the cluster. From the actions menu, choose configure package. To modify a package, select the package. For an instance package, create one package for each instance. On each node, supply the SID name for the package name. To create a package on the command line, use the cmgetconf command to get an editible configuration file. Set the AUTO_RUN parameter to YES, if you want the instance to start up as soon as the node joins the cluster. In addition, you should set the NODE_FAILFAST_ENABLED parameter to NO. If you are using CVM disk groups for the RAC database, be sure to include the name of each disk group on a separate STORAGE_GROUP line in the configuration file. You can also use packages to start up applications that access the RAC instances. If an application is intended to fail over among cluster nodes, then you must set it up as a distinct package, separate from the package that starts and stops the RAC instance. Use the following procedures for packages that contain applications which access the RAC database:
You can add or remove packages while the cluster is running, subject to the limit of MAX_CONFIGURED_PACKAGES. To add or remove packages online, refer to the section “Cluster and Package Maintenance” in chapter 7 of the Managing Serviceguard user’s guide. The package control script contains all the information necessary to run all the services in the package, monitor them during operation, react to a failure, and halt the package when necessary. You can use either Serviceguard Manager or HP-UX commands to create or modify the package control script. For security reasons, the control script must reside in a directory with the string cmcluster in the path. As you complete the tabs for the configuration, the control script can be generated automatically. When asked to supply the the pathname of the package run and halt scripts, use the filenames from the ECM toolkit. For more information, use the Help key. When you create a package control script this way, you do not need to do any further editing, but you may customize the script if you wish. Each package must have a separate control script, which must be executable. The control script is placed in the package directory and is given the same name as specified in the RUN_SCRIPT and HALT_SCRIPT parameters in the package ASCII configuration file. The package control script template contains both the run instructions and the halt instructions for the package. You can use a single script for both run and halt operations, or, if you wish, you can create separate scripts. Use the following procedure to create a control scripts for the sample package pkg1. First, generate a control script template:
You may customize the script, as described in the section, ““Customizing the Package Control Script”.” Check the definitions and declarations at the beginning of the control script using the information in the Package Configuration worksheet. You need to customize as follows:
If you need to define a set of run and halt operations in addition to the defaults, create functions for them in the sections under the heading CUSTOMER DEFINED FUNCTIONS. A set of four variables is provided to allow performance improvement when employing a large number of filesystems or storage groups. For more detail, see the comments in the control script template. They are:
Use the package control script to perform the following:
Set RAC environment variables in the package control script to define the correct execution environment for RAC. Enter the names of the LVM volume groups you wish to activate in shared mode in the VG[] array. Use a different array element for each RAC volume group. (Remember that RAC volume groups must also be coded in the cluster configuration file using OPS_VOLUME_GROUP parameters.) Be sure to specify shared activation with the vgchange command by setting the VGCHANGE parameter as follows:
If your disks are mirrored with LVM mirroring on separate physical paths and you want to override quorum, use the following setting:
Enter the names of the CVM disk groups you wish to activate in shared mode in the CVM_DG[] array. Use a different array element for each RAC disk group. (Remember that CVM disk groups must also be coded in the package ASCII configuration file using STORAGE_GROUP parameters.) Be sure to an appropriate type of shared activation with the CVM activation command. For example:
Do not define the RAC instance as a package service. Instead, include the commands that start up an RAC instance in the customer_defined_run_commands section of the package control script. Similarly, you should include the commands that halt an RAC instance in the customer_defined_halt_commands section of the package control script. Define the Oracle monitoring command as a service command, or else use the special Oracle script provided with the ECM Toolkit. To configure an Oracle RAC Instance Package, you can use either Serviceguard Manager or the command line. The Enterprise Cluster Master Toolkit (ECMT) provides a generic Oracle database script template which can be used to configure package behavior for an Oracle RAC Instance package. This script is integrated by the user into the standard Serviceguard package control script, to simplify the startup, monitoring, and shutdown of an Oracle database instance. Refer to the ECMT documentation for details on the use of ECMT. Each Oracle RAC database can have a database instance running on all nodes of a SGeRAC cluster. Therefore, it is not necessary to failover the database instance to a different SGeRAC node. This is the main difference between an Oracle RAC Instance Package and a single instance Oracle package. Use the following steps to set up the pre-package configuration on a SGeRAC node:
The following steps uses the information from the example is section 2.2. Assume SGMgr has been started, the following. It is assumed that the SGeRAC cluster environment is configured and the ECMT can be used to start the Oracle RAC database instance.
To monitor a remote Serviceguard RAC cluster, the entry of the GUI user name and server name must be in /etc/cmcluster/cmclnodelist file on all nodes in the cluster to be viewed. To monitor a local SGeRAC cluster as a non-root user, the GUI user name, server name and user role (at least monitor role) must be configured through CAP. For a remote cluster, any GUI user name (non-root or root), server name and user role (at least monitor role) should be configured through CAP. Please refer Control Access Policy for Serviceguard Commands and API clients External Specification for details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||