Managing Serviceguard NFS for Linux, March 2009
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
SLES. Copy and rename the external_script.template to the package directory with the
following command.
# cp /usr/local/cmcluster/conf/examples/external_script.template \
/usr/local/cmcluster/pkg02/external_script.sh
Add the additional external script into the package configuration file. For example:
external_script /usr/local/cmcluster/pkg02/external_script.sh
Modify the external script in the adoptive node. Specify the cmmodpkg command with the
package control option (-d) in the function start_command. As below:
function start_command
{
sg_log 5 "start_command"
cmmodpkg –d –n `hostname` pkg01 &
return $?
}
Also, add cmmodpkg command with package control option (-e ) in the function stop_command
for re-enabling the package pkg0 when the package pkg02 is halted. For example:
function stop_command
{
sg_log 5 "stop_command"
cmmodpkg –e –n `hostname` pkg01 &
return $?
}
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, and once the package pkg02 is halted in the
node the pkg01 is enabled by the command cmmodpkg –e in the function stop_command. The
ampersand (&) causes the cmmodpkg command to run in the background.
Configuring One Adoptive Node to Support Failover of Multiple Packages 47