Using Serviceguard Extension for RAC, 8th Edition, March 2009
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
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, and select the appropriate options for the storage activation command,
including options for mounting and unmounting file systems, if desired. 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,
CVM_ACTIVATION_CMD. Do not use the VG[] or VXVM_DG[] parameters for CVM disk
groups.
• If you are using VxVM disk groups without CVM, enter the names of VxVM disk groups
that will be imported using the VXVM_DG[] array parameters. Enter one disk group per
array element. Do not use theCVM_DG[] or VG[] parameters for VxVM disk groups
without CVM. Also, do not specify an activation command.
• Add the names of logical volumes and file systems that will be mounted on them.
• If you are using mirrored VxVM disks, specify the mirror recovery option VXVOL.
• Select the appropriate options for the storage activation command (not applicable for basic
VxVM disk groups), and also include options for mounting and unmounting filesystems,
if desired.
• Specify the filesystem mount retry and unmount count options.
• Define IP subnet and IP address pairs for your package.
• Add service name(s).
• Add service command(s)
• Add a service restart parameter, if desired.
Using Packages to Configure Startup and Shutdown of RAC Instances 109