Serviceguard NFS Toolkit A.11.31.02, A.11.11.06, and A.11.23.05 Administrator's Guide
NFS Control Scripts for pkg02
The nfs.cntl Control Script
This section shows the NFS control script (nfs2.cntl) for the pkg02 package 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 are omitted.
PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin
VGCHANGE=”vgchange -a e” # Default
CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=exclusivewrite"
VG[0]=nfsu02 LV[0]=/dev/nfsu02/lvol1; FS[0]=/hanfs/nfsu021; FS_MOUNT_OPT[0]="-o rw"
VXVOL="vxvol -g \$DiskGroup startall" #Default
FS_UMOUNT_COUNT=1
FS_MOUNT_RETRY_COUNT=0
IP[0]=15.13.114.244
SUBNET[0]=15.13.112.0
function customer_defined_run_cmds
{
/etc/cmcluster/nfs/nfs2_xmnt start
remsh thyme /etc/cmcluster/nfs/nfs2_xmnt start
}
The function customer_defined_run_cmds calls a script called nfs2_xmnt. This
script NFS-mounts the file system exported by the package pkg02. If you configured
the file system in the /etc/fstab file, the package might not be active yet when the
servers tried to mount the file system at system boot. By configuring the NFS control
script to NFS-mount the file system, you ensure that the package is active before the
mount command is invoked.
The first line in the customer_defined_run_cmds function executes the nfs2_xmnt
script locally on host basil (the primary node for pkg02). The second line, beginning
with remsh, executes the nfs2_xmnt script remotely on host thyme.
If pkg02 fails to come up, or if the remsh to host thyme fails, the file system will not
be mounted, and no error will be returned. The only way to be sure the file system was
mounted successfully is to run the nfs2_xmnt script manually on both host basil
and host thyme.
The only user-configurable values in the nfs2_xmnt script are the SNFS[n] and
CNFS[n] variables. These specify the server location of the file system and the client
mount point for the file system. The following line is the from the nfs2_xmnt script
in this example configuration:
SNFS[0]=”nfs2:/hanfs/nfsu021”; CNFS[0]=”/nfs/nfsu021”
In the SNFS[0] variable, “nfs2” is the name that maps to the relocatable IP address
of pkg02. It must be configured in the name service the host is using (DNS, NIS, or
66 Sample Configurations