Managing HP Serviceguard A.11.20.20 for Linux, May 2013

7.7.2 Creating the Package Control Script
For legacy packages, 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 Serviceguard Manager, Serviceguard commands, or a combination
of both, to create or modify the package control script.
Each package must have a separate control script, which must be executable.
For security reasons, the control script must reside in a directory with the string cmcluster in the
path. 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 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 cmmakepkg to create the control script, then edit the control script. Use the following procedure
to create the template for the sample failover package pkg1.
First, generate a control script template, for example:
cmmakepkg -s $SGCONF/pkg1/pkg1.sh
Next, customize the script; see “Customizing the Package Control Script ”.
7.7.2.1 Customizing the Package Control Script
You need to customize as follows; see the relevant entries under “Package Parameter Explanations
(page 174) for more discussion.
Update the PATH statement to reflect any required paths needed to start your services.
Specify the Remote Data Replication Method and Software RAID Data Replication method if
necessary.
CAUTION: If you are not using the serviceguard-xdc or CLX products, do not modify the
REMOTE DATA REPLICATION DEFINITION section. If you are using one of these products,
consult the product’s documentation.
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 necessary. ; See the fs_ parameter
descriptions starting with fs_mount_retry_count (page 187) for more information).
NOTE: Red Hat GFS and reiserfs are not supported in Serviceguard A.11.20.00.
Add the names of logical volumes and the file system that will be mounted on them.
Specify the filesystem mount and unmount retry options.
If your package uses a large number of volume groups or disk groups or mounts a large
number of file systems, consider increasing the number of concurrent vgchange,
mount/umount, and fsck operations;
Define IP subnet and IP address pairs for your package. IPv4 or IPv6 addresses are allowed.
Add service name(s).
Add service command(s)
Add a service restart parameter, if you so decide.
For more information about services, see the discussion of the service_ parameters starting
with service_name (page 183).
236 Cluster and Package Maintenance