Managing Serviceguard NFS for Linux, March 2009

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.
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
the cmmodpkg -d command is omitted from the NFS control script the 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 in 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. 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.
Configuring One Adoptive Node for an NFS package with File Lock
Migration
This configuration has two NFS servers and one NFS package, One server is the primary node
and the other server is the adoptive node for the NFS package. As shown in Figure 3-7 this sample
configuration enables the File Lock Migration Feature.
54 Sample Configurations