Using Serviceguard Extension for RAC, 7th Edition, September 2008
DEPENDENCY_NAME mp1
DEPENDENCY_CONDITION SG-CFS-MP-1=UP
DEPENDENCY_LOCATION SAME_NODE
DEPENDENCY_NAME mp2
DEPENDENCY_CONDITION SG-CFS-MP-2=UP
DEPENDENCY_LOCATION SAME_NODE
DEPENDENCY_NAME mp3
DEPENDENCY_CONDITION SG-CFS-MP-3=UP
DEPENDENCY_LOCATION SAME_NODE
Configuring Packages that Access the Oracle RAC Database
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:
1. In the ASCII package configuration file, set the AUTO_RUNparameter to NO, or if you are
using Serviceguard Manager to configure packages, set Automatic Switching to
Disabled. This keeps the package from starting up immediately when the node joins the
cluster, and before RAC is running.
2. You can then manually start the package using the cmmodpkg -e packagename command
after RAC is started. Alternatively, you can choose to automate the process of package
activation by writing your own script, and copying it to all nodes that can run the package.
This script should contain the cmmodpkg -e command and activate the package after RAC
and the cluster manager have started.
Adding or Removing Packages on a Running Cluster
You can add or remove packages while the cluster is running, subject to the limit of
MAX_CONFIGURED_PACKAGES. For more detailed information on adding or removing packages
online, refer to section “Cluster and Package Maintenance” in the Managing Serviceguard Fifteenth
Edition user’s guide.
Writing the Package Control Script
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.
Using Serviceguard Manager to Write the Package Control Script
As you complete the tabs for the configuration, the control script can be generated automatically.
When asked to supply 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.
Using Commands to Write the Package Control Script
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.
Using Packages to Configure Startup and Shutdown of RAC Instances 103