Managing Serviceguard NFS for Linux, March 2009

SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
SUBNET 192.100.112.0
Package Control Script for pkg02
This section shows shows the package control script (pkg02.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
VGCHANGE="vgchange -a y" # Default
VG[0]="nfsu02"
LV[0]=/dev/nfsu02/lvol1;
FS[0]=/hanfs/nfsu021;
FS_TYPE[0]="ext3";
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_APP_SERVER="pre-IP"
NFS_SERVICE_NAME[0]="nfs2.monitor"
NFS_SERVICE_CMD[0]="/usr/local/cmcluster/pkg02/nfs.mon"
NFS_SERVICE_RESTART[0]="-r 0"
To prevent a shared adoptive node from adopting both packages together, disable the package
by specifying the cmmodpkg command with the package control option (-d) in the
customer_defined_run_cmds. For example:
function customer_defined_run_cmds
{
cmmodpkg -d -n `hostname` pkg01 &
}
Also, add cmmodpkg command with package control option (-e ) in the
customer_defined_halt_cmds for re-enabling the package pkg02 when the package pkg01
is halted. For example:
function customer_defined_halt_cmds
{
cmmodpkg -e -n `hostname` pkg01 &
}
This package control function can prevent an adoptive node from becoming overloaded when
multiple packages fail over. If an adoptive node becomes overloaded, it can fail. In this example,
if a host is an adoptive node for both pkg01 and pkg02, disabling of pkg01 would prevent the
host that is running pkg02 from adopting pkg01. Once the package pkg02 is halted in the node
the pkg01 is enabled by the command cmmodpkg e in the customer_defined_halt_cmds.
The ampersand (&) causes the cmmodpkg command to run in the background. The cmmodpkg
command in the background allows the control script to complete and finish bringing up the
package. There is a small window of time, during which if one package has begun to fail over
but the cmmodpkg command has not executed, the other package can fail over and the host will
adopt it.
In other words, if two packages fail over at approximately the same time, a host may adopt both
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.
44 Sample Configurations