Using Serviceguard Extension for RAC, 6th Edition, April 2008
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.
Use the following procedure to create a control scripts for the sample package pkg1.
First, generate a control script template:
# cmmakepkg -s /etc/cmcluster/pkg1/control.sh
132 Serviceguard Configuration for Oracle 9i RAC