Using Serviceguard Extension for RAC, 9th Edition, September 2010
1. In the ASCII package configuration file, set the AUTO_RUN parameter 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 the latest edition of the Managing Serviceguard user 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.
Using Commands to Write the Package Control Script
Each package must have a separate control script that 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 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
You may customize the script, as described in the section, “Customizing the Package Control
Script”
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:
• Update the PATH statement to reflect any required paths needed to start your services.
• If you are using LVM, enter the names of volume groups to be activated using the VG[]
array parameters, select the appropriate options for the storage activation command, and
if you prefer, include options for mounting and unmounting file systems. Do not use the
VXVM_DG[] or CVM_DG[] parameters for LVM volume groups.
• If you are using CVM, enter the names of disk groups to be activated using the CVM_DG[]
array parameters, and select the appropriate storage activation command,
Using Packages to Configure Startup and Shutdown of RAC Instances 105