Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Managing Highly Available NFS: HP 9000 Networking > Chapter 3 Sample Configurations

Two Servers with NFS Cross-Mounts

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This configuration has two servers and two packages. The primary node for each package NFS-mounts the file systems from its own package and the other package. Figure 3-7 “Two Servers with NFS Cross-Mounts” illustrates this configuration. If one server fails, the other server adopts its package. The NFS mounts are not interrupted when a package fails over. Figure 3-8 “Two Servers with NFS Cross-Mounts” shows the same configuration after one server has failed.

Figure 3-7 Two Servers with NFS Cross-Mounts

Two Servers with NFS Cross-Mounts

Figure 3-8 “Two Servers with NFS Cross-Mounts” shows two servers with NFS cross-mounted file systems after server thyme has failed. The NFS mounts on server basil are not interrupted.

Figure 3-8 Two Servers with NFS Cross-Mounts

Two Servers with NFS Cross-Mounts

Cluster Configuration File for Two-Server NFS Cross-Mount

This section shows the cluster configuration file (cluster.conf) for this configuration example. The comments are not shown.

CLUSTER_NAME             XMnt

FIRST_CLUSTER_LOCK_VG /dev/nfsu01

NODE_NAME thyme
NETWORK_INTERFACE lan0
HEARTBEAT_IP 15.13.119.146
NETWORK_INTERFACE lan1
FIRST_CLUSTER_LOCK_PV /dev/dsk/c0t1d0

NODE_NAME basil
NETWORK_INTERFACE lan0
HEARTBEAT_IP 15.13.113.168
FIRST_CLUSTER_LOCK_PV /dev/dsk/c1t1d0

HEARTBEAT_INTERVAL 1000000
NODE_TIMEOUT 2000000

AUTO_START_TIMEOUT 600000000
NETWORK_POLLING_INTERVAL 2000000

VOLUME_GROUP /dev/nfsu01
VOLUME_GROUP /dev/nfsu02

Package Configuration File for pkg01

This section shows the package configuration file (nfs1.conf) for the package pkg01 in this sample configuration. The comments are not shown.

PACKAGE_NAME              pkg01

NODE_NAME thyme
NODE_NAME basil

RUN_SCRIPT /etc/cmcluster/nfs/nfs1.cntl
RUN_SCRIPT_TIMEOUT NO_TIMEOUT
HALT_SCRIPT /etc/cmcluster/nfs/nfs1.cntl
HALT_SCRIPT_TIMEOUT NO_TIMEOUT

SERVICE_NAME nfs1.monitor
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300

SUBNET 15.13.112.0

PKG_SWITCHING_ENABLED YES

NET_SWITCHING_ENABLED YES

NODE_FAIL_FAST_ENABLED NO

NFS Control Script for pkg01

This section shows the NFS control script (nfs1.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

#VGCHANGE="vgchange -a e -q n"
#VGCHANGE="vgchange -a y"
VGCHANGE="vgchange -a e" # Default

VG[0]=nfsu01

LV[0]=/dev/nfsu01/lvol1; FS[0]=/hanfs/nfsu011

XFS[0]=/hanfs/nfsu011

IP[0]=15.13.114.243
SUBNET[0]=15.13.112.0

NFS_SERVICE_NAME[0]="nfs1.monitor"
NFS_SERVICE_CMD[0]="/etc/cmcluster/nfs/nfs.mon"
#NFS_SERVICE_RESTART[0]=

function customer_defined_run_cmds
{
/etc/cmcluster/nfs/nfs1_xmnt start
remsh basil /etc/cmcluster/nfs/nfs1_xmnt start
}

The function customer_defined_run_cmds calls a script called nfs1_xmnt. This script NFS-mounts the file system exported by the package pkg01. 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 nfs1_xmnt script locally on host thyme (the primary node for pkg01). The second line, beginning with remsh, executes the nfs1_xmnt script remotely on host basil.

If pkg01 fails to come up, or if the remsh to host basil 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 nfs1_xmnt script manually on both host thyme and host basil.

The only user-configurable values in the nfs1_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 nfs1_xmnt script in this example configuration:

SNFS[0]="nfs1:/hanfs/nfsu011"; CNFS[0]="/nfs/nfsu011"

In the SNFS[0] variable, "nfs1" is the name that maps to the relocatable IP address of pkg01. It must be configured in the name service the host is using (DNS, NIS, or the /etc/hosts file). If you do not want to configure a name for the package, you can just specify the IP address in the SNFS[0] variable, as follows:

SNFS[0]="15.13.114.243:/hanfs/nfsu011"; CNFS[0]="/nfs/nfsu011"

The client mount point, specified in the CNFS[0] variable, must be different from the location of the file system on the server (SNFS[0]).

Package Configuration File for pkg02

This section shows the package configuration file (nfs2.conf) for the package pkg02 in this sample configuration. The comments are not shown.

PACKAGE_NAME              pkg02

NODE_NAME basil
NODE_NAME thyme

RUN_SCRIPT /etc/cmcluster/nfs/nfs2.cntl
RUN_SCRIPT_TIMEOUT NO_TIMEOUT
HALT_SCRIPT /etc/cmcluster/nfs/nfs2.cntl
HALT_SCRIPT_TIMEOUT NO_TIMEOUT

SERVICE_NAME nfs2.monitor
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300

SUBNET 15.13.112.0

PKG_SWITCHING_ENABLED YES

NET_SWITCHING_ENABLED YES

NODE_FAIL_FAST_ENABLED NO

NFS Control Script for pkg02

This section shows the NFS control script (nfs2.cntl) for the package pkg02 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

#VGCHANGE="vgchange -a e -q n"
#VGCHANGE="vgchange -a y"
VGCHANGE="vgchange -a e" # Default

VG[0]=nfsu02

LV[0]=/dev/nfsu02/lvol1; FS[0]=/hanfs/nfsu021

XFS[0]=/hanfs/nfsu021

IP[0]=15.13.114.244
SUBNET[0]=15.13.112.0

NFS_SERVICE_NAME[0]="nfs2.monitor"
NFS_SERVICE_CMD[0]="/etc/cmcluster/nfs/nfs.mon"
#NFS_SERVICE_RESTART[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 the /etc/hosts file). If you do not want to configure a name for the package, you can just specify the IP address in the SNFS[0] variable, as follows:

SNFS[0]="15.13.114.244:/hanfs/nfsu021"; CNFS[0]="/nfs/nfsu021"

The client mount point, specified in the CNFS[0] variable, must be different from the location of the file system on the server (SNFS[0]).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.