Managing MC/ServiceGuard NFS for Linux, December 2001

Sample Configurations
Configuring One Adoptive Node to Support Failover of Multiple Packages
Chapter 348
Package Control Script for pkg02
This section shows the package control script (pkg2.cntl) for the
package pkg02 in this sample configuration. Only the user-configured
part of the script is shown; the executable part of the script and most of
the comments have been omitted.
PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin:usr/local/
cmcluster/bin
RAIDTAB="/usr/local/cmcluster/conf/raidtab.sg"
RAIDSTART="raidstart -c ${RAIDTAB}"
RAIDSTOP="raidstop -c ${RAIDTAB}"
VGCHANGE="vgchange -a y" # Default
VG[0]="nfsu02"
MD[0]="/dev/md1"
LV[0]=/dev/nfsu02/lvol1;
FS[0]=/hanfs/nfsu021;
FS_TYPE[0]="ext2";
FS_MOUNT_OPT[0]="-o rw"
# FS_UMOUNT_COUNT=""
# FS_MOUNT_RETRY_COUNT=""
IP[0]="192.100.112.244"
SUBNET[0]="192.100.112.0"
HA_NFS_SERVER="yes"
#SERVICE_NAME[0]=""
#SERVICE_CMD[0]=""
#SERVICE_RESTART[0]=""
The function customer_defined_run_cmds calls the cmmodpkg
command with the package control option (-d). This command prevents
the host that is running pkg02 from adopting pkg01. The ampersand (&)
causes the cmmodpkg command to run in the background. It must run in
the background to allow the control script to complete.
There is a short time, after one primary node has failed but before the
cmmodpkg command has executed, when the other primary node can fail
and the adoptive node will adopt its package. In other words, if both
thyme and basil fail at approximately the same time, host sage may
adopt two packages, even though the package control option is specified.
If you omit the cmmodpkg -d command from the NFS control script, host
sage can adopt both pkg01 and pkg02 if their primary nodes fail.