HP Serviceguard Toolkit for NFS on Linux User Guide (May 2013)

g. Add the startup command under the function customer_defined_run_cmds:
function customer_defined_run_cmds
{
# ADD customer defined start command
$SGCONF/NFS/toolkit.sh start
test_return 51
}
h. Add package stop command under customer_defined_halt_cmds:
function customer_defined_halt_cmds
{
# ADD customer defined halt command
$SGCONF/NFS/toolkit.sh stop
test_return 52
}
i. If two packages have the same adoptive node, and you want to prevent a shared adoptive
node from adopting both packages at once, specify the cmmodpkg command with the
package control option (-d) in the customer_defined_run_cmds file.
function customer_defined_run_cmds
{
cmmodpkg -d -n hostname pkg02 &
}
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, the cmmodpkg
-d command, in the control script for pkg01, prevents the host that is running pkg01
from adopting pkg02. If pkg02 fails, it fails over to another adoptive node (if configured)
where pkg01 is not running.
Add a similar line in the control script for pkg02 to prevent the host that is running pkg02
from adopting pkg01.
The ampersand (&) in the command causes the cmmodpkg command to run in the
background and allows the control script to complete and finish bringing up the package.
NOTE: 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.
j. Use the default values for the rest of the variables in the control script, or change them
as required.
7. Edit the NFS configuration file (hanfs.conf).
a. Create a separate XFS[n] variable for each NFS directory to be exported. Specify the
directory name and any export options. For example:
XFS[0]=*:/ha_root
XFS[1]="*:/users/scaf"
XFS[2]="-o ro *:/ha_data"
XFS[3]="-o fsid=23,rw *:/pkg3"
Deploying NFS toolkit packages 13