Managing Serviceguard 12th Edition, March 2006

Configuring Packages and Their Services
Creating the Package Control Script
Chapter 6 291
When the command started by cmrunserv exits, Serviceguard
determines that a failure has occurred and takes appropriate action,
which may include transferring the package to an adoptive node.
If a run command is a shell script that runs some other command
and then exits, Serviceguard will consider this normal exit as a
failure.
To avoid problems in the execution of control scripts, ensure that each
run command is the name of an actual service and that its process
remains alive until the actual service stops.
If you need to define a set of run and halt operations in addition to the
defaults, create functions for them in the sections under the heading
CUSTOMER DEFINED FUNCTIONS. If your package needs to run short-lived
processes, such as commands to initialize or halt a packaged application,
you can also run these from the CUSTOMER DEFINED FUNCTIONS.
How Control Scripts Manage VxVM Disk Groups
VxVM disk groups outside CVM are outside the control of the
Serviceguard cluster. The package control script uses standard VxVM
commands to import and deport these disk groups. (For details on
importing and deporting disk groups, refer to the discussion of the
import
and
deport
options in the vxdg man page.)
The control script imports disk groups using the vxdg command with the
-tfC options. The -t option specifies that the disk is imported with the
noautoimport
flag, which means that the disk will not be automatically
re-imported at boot time. Since disk groups included in the package
control script are only imported by Serviceguard packages, they should
not be auto-imported.
The -f option allows the disk group to be imported even if one or more
disks (a mirror, for example) is not currently available. The -C option
clears any existing host ID that might be written on the disk from a prior
activation by another node in the cluster. If the disk had been in use on
another node which has gone down with a TOC, then its host ID may still
be written on the disk, and this needs to be cleared so the new node’s ID
can be written to the disk. Note that the disk groups are not imported
clearing the host ID if the host ID is set and matches a node that is not in
a failed state. This is to prevent accidental importation of a disk group on
multiple nodes which could result in data corruption.