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 Serviceguard NFS for Linux > Chapter 2 Installing and Configuring Serviceguard NFS for Linux

Configuring a Modular Serviceguard NFS Package

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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.

  1. 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.

  2. Set the package_name variable. For example:

    Package_name pkg01

    Each package must have a unique name.

  3. 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
    
  4. Set the script_log_file variable. For example:

    script_log_file /usr/local/cmcluster/<pkg_dir>/log

  5. Set the TKIT_DIR variable as the path of <package_directory>. For Example

    TKIT_DIR /usr/local/cmcluster/<pkg_dir>

  6. 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.

  7. If you want to start and monitor rpc.quotad daemon, set QUOTA_MON to YES. For example:

    QUOTA_MON YES

    If you do not want to start and monitor rpc.quotad daemon, set QUOTA_MON to NO. For example:

    QUOTA_MON NO
  8. 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

    NOTE: To use the lock migration feature, all the configurations specified above must be done. Also, consider the lock migration feature limitations described in section“Limitations of the NFS File Lock Migration Feature”.
  9. 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.
  10. 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.
  11. 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.

  12. 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.

    NOTE: To use the lock migration feature, do all the configurations specified above and consider all the limitations mentioned in the section “Limitations of the NFS File Lock Migration Feature”.
  13. Set Service parameters to run NFS monitor service.

    1. Set service_name parameter. Each package must have an unique service_name. For example: service_name nfs_service

    2. 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.

  14. Set variables for monitoring subnets.

    1. Set the monitored_subnet variables to the subnet that is monitored for the package. For example: monitored_subnet 192.100.112.0

    2. 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.

  15. Set variables for adding package IP.

    1. Set ip_subnet to one of the valid subnets available on the node. For example: ip_subnet 192.100.112.0

    2. Set ip_subnet_node to the node names in which the above subnet is valid. Repeat this variable as many times as needed to specify multiple nodes in same subnet. For example: ip_subnet_node nodeA ip_subnet_node nodeB

    3. Set ip_address to a valid package IP. The IP must belong to the subnet specified above. For example: ip_address 192.100.112.1

      NOTE: Specify multiple IP Addresses for a NFS package when lock migration is disabled. Repeat the above variable as many times as required to specify multiple package addresses.

      The IP address you specify is the relocatable IP address for the package. NFS clients that mount the file systems in the package will use this IP address to identify the server. You should configure a name for this address in the DNS or NIS database, or in the /etc/hosts file.

      All the above variables, that is ip_subnet, ip_subnet_node and ip_address must be repeated in case there is a need to specify another IP address for a package in different nodes on a different subnet.

  16. Create a separate vg variable for each volume group.

    For example:

    vg vg01

    vg vg02

  17. 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

  1. 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

  2. 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.

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