 |
» |
|
|
 |
To configure a Modular NFS package, complete the following tasks: Editing the Package Configuration file (pkg.conf) Creating the Serviceguard binary configuration file
 |  |  |  |  | NOTE: Repeat the configuration process for each NFS package |  |  |  |  |
Editing the Package Configuration File (pkg.conf) |  |
The following steps describe the required modifications to the
Package Configuration file. Make one Package Configuration file for
each package. Except for the variables listed below, use the default
values for the variables in the package configuration file, or change
them as needed. For instructions on modifying the default
values, see the Managing HP Serviceguard Linux manual, or read the comments in the package configuration
file. Set the package_name variable.
For example: Package_name pkg01 Each package must have a unique name. Create a node_name variable for
each node that will run the package. The first node_name should specify the primary node. All the node_name variables following the primary node should specify the adoptive
nodes, in the order in which they will be tried. For example: NODE_NAME thyme
NODE_NAME basil
NODE_NAME sage
|
Set the script_log_file variable.
For example: script_log_file /usr/local/cmcluster/<pkg_dir>/log Set the TKIT_DIR variable as
the path of <package_directory>. For Example TKIT_DIR /usr/local/cmcluster/<pkg_dir> Create a separate XFS[n] variable
for each NFS directory to be exported. Specify the directory name
and any export options. For example: XFS ”*:/ha_root”
XFS "*:/users/scaf"
XFS "-o ro *:/ha_data"
XFS "-o fsid=23,rw *:/pkg03"
|
Do not configure these exported directories in the /etc/exports file. When an NFS server is started, it attempts
to export all file systems in its /etc/exports file. If those file systems are not currently present on the NFS
server node, the node cannot boot properly. This happens if the server
is an adoptive node for a file system, and the file system is available
on the server only after failover of the primary node. If you want to start and monitor rpc.quotad daemon, set QUOTA_MON to YES. For example: If you do not want to
start and monitor rpc.quotad daemon, set QUOTA_MON to NO. For example: LOCK_MIGRATION: To enable File Lock Migration,
set the LOCK_MIGRATION variable to “YES”.
By default the variable is set to “NO”. For example: LOCK_MIGRATION YES NFS_FLM_HOLDING_DIR: NFS File Lock Migration
(FLM) directory is a unique directory created in one of the shared
volumes associated with this package. This directory holds copies
of the /var/lib/nfs/sm files on SLES and /var/lib/nfs/statd/sm files on Red Hat for this package. Create this directory in one of the shared volumes associated
with this package so that it can migrate with the package (from the
primary server to the adoptive server). Dedicate the FLM directory
for holding SM entries only.  |  |  |  |  | NOTE: Do not add any files as this directory is maintained by the
toolkit. This directory should not have other files or subdirectories
when starting the cluster. All files in this directory are deleted
after a failover. An example for this parameter is as follows: NFS_FLM_HOLDING_DIR /pkg1a/sm This directory should be
present in one of the file systems specified in the package configuration
file. |  |  |  |  |
PROPAGATE_INTERVAL: Number of seconds
between attempts of the script to copy files from the /var/lib/nfs/sm directory on SLES and /var/lib/nfs/statd/sm on Red Hat into the holding directory, specified by NFS_FLM_HOLDING_DIR. The default value of this parameter is five seconds. For example: PROPAGATE_INTERVAL 5  |  |  |  |  | NOTE: The NFS client may not receive a crash notification if it sends
an initial lock request to the NFS server and during the interim,
the NFS package fails over to an adoptive node before the FLM script
copies the /var/lib/nfs/statd/sm entry on Red
Hat and /var/lib/nfs/sm entry on SLES for this
client to the package holding directory. Therefore, the client may
not reclaim the lock once the NFS package fails over to the adoptive
node. The probability of this occurring within the default time interval
between copies is extremely low as the SM file copy interval is very
short (by default, five seconds). You can reduce the probability further
by configuring the time interval to a value lower than the default. |  |  |  |  |
NFS_FLM_MONITOR: To monitor the file lock
migration script (nfs.flm) by the NFS monitor script (nfs.mon), set the NFS_FLM_MONITOR variable to “YES”.
The default value is NO. Setting this parameter to “YES”
ensures that the lock status files are being copied into holding directory. NFS_FLM_RESTART: Number of times the monitoring
script should attempt to restart the file lock migration script (nfs.flm) if it fails. The default value is 4. Set Service parameters to run NFS monitor service. Set service_name parameter. Each
package must have an unique service_name. For
example: service_name nfs_service Set service_fail_fast_enabled to YES if lock migration is enabled. For example: service_fail_fast_enabled
YES  |  |  |  |  | NOTE: In Red Hat, there are times when sending SIGKILL to the kernel
‘lockd’ thread might not release
all the file locks and cause the failure of the unmounting the filesystem.
To force unmount the filesystem, the machine has to be restarted.
In such cases, it is recommended to set SERVICE_FAIL_FAST_ENABLED to “YES” which reboots the machine upon service failure.
In SLES, the SM directory does not get consistently updated with the
client entries. This is due to client entry being made for the first
time only after the system has booted. After a fail back of the package,
the NFS fails to create SM directory entries. After a fail back, if
the client attempts to reclaim his locks, fresh entries for the clients
will not be made in the /var/lib/nfs/sm directory
of the server. For SLES, it is mandatory to set SERVICE_FAIL_FAST_ENABLED to “YES”, so that the server reboots in order to have
lock migration feature work consistently. If you halt the package
manually on any node configured for an NFS package, you must reboot
the machine before the package is run again on the same node. |  |  |  |  |
Set variables for monitoring subnets. Set the monitored_subnet variables
to the subnet that is monitored for the package. For example: monitored_subnet 192.100.112.0 Set the monitored_subnet_access variable to full if the subnet is available on all the nodes, else
set it to partial. For example: monitored_subnet_access
full or monitored_subnet_access partial Repeat the above variables as many times as needed to monitor
multiple subnets.
Set variables for adding package IP. Create a separate vg variable for
each volume group. For example: vg vg01 vg vg02 Create a separate fs_name, fs_directory, fs_type, and fs_mount_opt variable for each volume group and file system
that will be mounted on the server. For example: fs_name /dev/vg01/lvol1
fs_directory /ha_root
fs_type "ext3"
fs_mount_opt "-o rw"
fs_umount_opt ""
fs_fsck_opt ""
fs_name /dev/vg01/lvol2
fs_directory /users/scaf/ha_data
fs_type "reiserfsext3"
fs_mount_opt "-o rw"
fs_umount_opt ""
fs_fsck_opt ""
fs_name /dev/vg02/lvol1
fs_directory /ha_data
fs_type "ext3"
fs_mount_opt "-o ro"
fs_umount_opt ""
fs_fsck_opt ""
|
This example defines the variable for three NFS mounted file
systems, ha_root, /users/scaf and ha_data. Creating the Serviceguard Binary Configuration File |  |
Use the cmapplyconf command to
verify the content of your cluster and package configuration and to
copy the binary configuration file to all the nodes in the cluster.
In the following example, the cluster configuration file is /usr/local/cmcluster/cluster.conf. On your system, use
the names of your own cluster configuration and package configuration
files. # cmapplyconf -v -C /usr/local/cmcluster/cluster.conf
\ -P /usr/local/cmcluster/pkg01/pkg01.conf Use your favorite copy utility (for example, scp) to copy the package control, NFS control, and
monitor scripts to the same path names on all the nodes in the cluster.
For example, to copy the files from host thyme to host basil, issue the following
command from host thyme: # scp /usr/local/cmcluster/cluster/pkg01/*
\ basil:/usr/local/cmcluster/cluster/pkg01
Housekeeping Suggestions |  |
After the shell scripts are installed they are located in /usr/local/cmcluster/nfstoolkit and the binary file is
located in /usr/bin on your Linux platforms. It is recommended that you set up directories to keep your various
package and script files grouped for organization. Set up one directory
for each package and keep the associated control and monitoring scripts
in that directory.
|