Managing Serviceguard NFS for Linux, March 2009
if a host is an adoptive node for both pkg01 and pkg02, disabling of pkg02, in the external
script for pkg01, would prevent the host that is running pkg01 from adopting pkg02, and once
the package pkg01 is halted in the node the pkg02 is enabled by using the command cmmodpkg
–e in the function stop_command. 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.
NOTE: The above changes in the external script must be done only on the adoptive node and
NOT on the external script in the primary node. If there are more than 2 packages the user may
repeat the cmmodpkg command as many times required with other package names. User may
consider making FAILBACK_POLICY as AUTOMATIC to free the adoptive node as early as
possible so that adoptive node is ready to accept pkg02 in case it fails.
Package Configuration File for pkg02
This section shows the package configuration file (pkg02.conf) for the package pkg01 in this
sample configuration. The comments are not shown.
package_name pkg02
package_type failover
failover_policy configured_node
failback_policy manual
node_name basil
node_name sage
auto_run yes
node_fail_fast_enabled no
script_log_file /usr/local/cmcluster/pkg02/log
TKIT_DIR /usr/local/cmcluster/pkg02
XFS[0] "-o rw *:/hanfs/nfsu021"
QUOTA_MON YES
LOCK_MIGRATION NO
monitored_subnet 192.100.112.0
monitored_subnet_access full
service_name nfs2.monitor
service_cmd "$SGCONF/scripts/tkit/nfs/tkit_module.sh nfs_monitor"
service_restart none
service_fail_fast_enabled no
service_halt_timeout 300
external_script $SGCONF/scripts/tkit/nfs/lock_migration.sh
ip_subnet 192.100.112.0
#ip_subnet_node
ip_address 192.100.112.244
vgchange_cmd "vgchange -a y"
vg nfsu02
fs_name /dev/nfsu02/lvol1
fs_directory /hanfs/nfsu021
fs_type ext3
fs_mount_opt "-o rw"
# fs_umount_opt
# fs_fsck_opt
To prevent a shared adoptive node from adopting both packages together, specify the cmmodpkg
command with the package control option (-d) in the external script. The external script template
is provided at /usr/local/cmcluster/conf/examples/external_script.template
in Red Hat and at /opt/cmcluster/conf/examples/external_script.template in
Configuring Multiple Adoptive Nodes for Cascading Failover 53