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.
Figure 3-8 shows the same
configuration after one primary server has failed. Figure 3-6 shows this sample configuration
after host basil has failed. Host sage has adopted pkg02.
Cluster Configuration File for Adoptive Node for NFS package
with File Lock Migration |
 |
This section shows an example of the cluster configuration file
(cluster.conf) for NFS package with File Lock
Migration. The comments are not shown.
CLUSTER_NAME PkgCtrl
QS_HOST qs
QS_POLLING_INTERVAL 300000000
NODE_NAME thyme
NETWORK_INTERFACE eth0
HEARTBEAT_IP 192.100.112.146
NETWORK_INTERFACE eth1
NODE_NAME sage
NETWORK_INTERFACE eth0
HEARTBEAT_IP 192.100.112.184
NETWORK_INTERFACE eth1
NETWORK_INTERFACE eth2
HEARTBEAT_INTERVAL 1000000
NODE_TIMEOUT 5000000
AUTO_START_TIMEOUT 600000000
NETWORK_POLLING_INTERVAL 2000000
MAX_CONFIGURED_PACKAGES 4 |
Sample Configuration for Legacy Packages |
 |
Configuration files of two legacy packages are described in
this section. These samples are applicable to Red Hat environment.
For SLES user can replace all occurrences of "/usr/local" with /opt.
Package Configuration File for pkg01
This section shows an example of the package configuration file
(pkg01.conf) for the package pkg01 in this sample configuration. The comments are not shown.
PACKAGE_NAME pkg01
PACKAGE_TYPE FAILOVER
FAILOVER_POLICY CONFIGURED_NODE
FAILBACK_POLICY MANUAL
NODE_NAME thyme
NODE_NAME sage
AUTO_RUN YES
NODE_FAIL_FAST_ENABLED NO
RUN_SCRIPT
/usr/local/cmcluster/pkg01/pkg01.cntl
RUN_SCRIPT_TIMEOUT NO_TIMEOUT
HALT_SCRIPT
/usr/local/cmcluster/pkg01/pkg01.cntl
HALT_SCRIPT_TIMEOUT NO_TIMEOUT
SERVICE_NAME nfs1.monitor
SERVICE_FAIL_FAST_ENABLED YES
SERVICE_HALT_TIMEOUT 300
SUBNET 192.100.112.0 |
Package Control Script for pkg01
This section shows the package control script (pkg01.cntl) for the package pkg01 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 have been omitted.
PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin:usr/local/cmcluster/bin
VGCHANGE="vgchange -a y" # Default
VG[0]="nfsu01"LV[0]=/dev/nfsu01/lvol1; FS[0]=/hanfs/nfsu011; FS_TYPE[0]="ext3;FS_MOUNT_OPT[0]="-o rw"
# FS_UMOUNT_COUNT=""
# FS_MOUNT_RETRY_COUNT=""
IP[0]="192.100.112.243"SUBNET[0]="192.100.112.0"HA_APP_SERVER="pre-IP"
SERVICE_NAME[0]="nfs1.monitor"
SERVICE_CMD[0]="/usr/local/cmcluster/pkg01/nfs.mon"
SERVICE_RESTART[0]="-r 0"
function customer_defined_run_cmds
{ $HA_APP_SCRIPT lock_migration:${IP[0]}
test_return 51
} |
The function customer_defined_run_cmds calls
the toolkit.sh script with lock_migration:<IP_address> parameter for file lock migration. The argument to be passed to
the HA_APP_SCRIPT for lock migration should contain
the same name or IP address used by the clients while mounting the
exported file system.
NFS Toolkit Configuration File for pkg01 (hanfs.conf)
This section shows the NFS toolkit configuration file (hanfs.conf) for the package pkg01 on this sample configuration. This example enables the File Lock
Migration feature.
XFS[0]="-o rw *:/hanfs/nfsu011
LOCK_MIGRATION=YES
NFS_FLM_HOLDING_DIR="/hanfs/nfsu011/sm"
PROPAGATE_INTERVAL=5
NFS_FLM_MONITOR=YES
NFS_FLM_RESTART=4 |
Sample Configuration for Modular Packages |
 |
Configuration files of two Modular packages are described in
this section. These samples are applicable to Red Hat environment.
For SLES user can replace all occurrences of /usr/localwith /opt.
Package Configuration File for pkg01
This section shows an example of the package configuration file
(pkg01.conf) for the package pkg01 in this sample configuration. The comments are not shown.
 |
package_name pkg01
package_type failover
failover_policy configured_node
failback_policy manual
node_name thyme
node_name sage
auto_run yes
node_fail_fast_enabled no
script_log_file /usr/local/cmcluster/pkg01/log
TKIT_DIR /usr/local/cmcluster/pkg01
XFS[0] "-o rw *:/hanfs/nfsu011"
QUOTA_MON YES
LOCK_MIGRATION YES
NFS_FLM_HOLDING_DIR /hanfs/nfsu011/sm
PROPAGATE_INTERVAL 5
NFS_FLM_MONITOR YES
NFS_FLM_RESTART 4
monitored_subnet 192.100.112.0
monitored_subnet_access full
service_name nfs1.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.243
vgchange_cmd "vgchange -a y"
vg nfsu01
fs_name /dev/nfsu01/lvol1
fs_directory /hanfs/nfsu011
fs_type ext3
fs_mount_opt "-o rw"
# fs_umount_opt
# fs_fsck_opt
|