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 1 Serviceguard NFS for LINUX Introduction

How the Master Control Script works in Modular Packages

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

In Modular packages, Serviceguard invokes a master control script to start and stop packages. The master control script in turn uses the application specific tkit_module.sh to start or stop the NFS application. The tkit_module.sh script is installed with the toolkit in the /usr/local/cmcluster/conf/scripts/tkit/nfs directory in Red Hat and /opt/cmcluster/conf/scripts/tkit/nfs directory in SLES.

NOTE: For more information on Modular packaging, see the Modular package support in Serviceguard for Linux and ECM Toolkits whitepaper available at: http://docs.hp.com -> High Availability -> Serviceguard for Linux Toolkits -> White Papers.

Starting the NFS Services

When called with the start parameter, the master control script uses the various scripts provided by Serviceguard or Toolkit to complete the following tasks:

  • Activate the volume group or volume groups associated with the package.

  • Mount each file system associated with the package.

  • Invokes tkit_module.sh which in turn invokes toolkit.sh to run the NFS start script.

  • The NFS script hanfs.sh, exports each file system associated with the package so that it can later be NFS-mounted by clients.

  • Assign a package IP address to the LAN card on the current node.

  • Execute any external script specified. In NFS lock_migration.sh is executed if lock migration is enabled in the package configuration file.

  • The NFS script initiates the NFS monitor script to check periodically on the health of NFS services, if you have configured your NFS package to use the monitor script.

    NOTE: After completing the above sequence, the NFS server is active, and clients can NFS-mount the exported file systems associated with the package.

Starting File Lock Migration

If you enable LOCK MIGRATION in the package configuration file. The script lock_migration.sh present in usr/local/cmcluster/conf/scripts/tkit/nfs directory in Red Hat and /opt/cmcluster/conf/scripts/tkit/nfs directory in SLES is invoked. This script is executed as an external script.

The lock_migration.sh will in turn call the NFS control script with the lock_migration parameter. The following is performed by the control script:

  • Populates the /var/lib/nfs/sm directory on SLES and /var/lib/nfs/statd/sm directory on Red Hat with the Status Monitor entries from the configured holding directory of the package, and subsequently removes the entries from the holding directory.

  • Kills any running copy of the NFS File Lock Migration synchronization script, nfs.flm.

  • Restarts the lockd and sm-notify on SLES and rpc.statd on Red Hat using the package IP. Restarting this daemon triggers a crash recovery notification event, whereby sm-notify/rpc.statd sends crash notification messages to all clients listed in the /var/lib/nfs/statd/sm directory on Red Hat and /var/lib/nfs/sm directory on SLES.

  • Starts the File Lock Migration synchronization script, which periodically copies the SM directory entries to the holding directory.

Halting the NFS Services

When called with the stop parameter, the control script does the following:

  • Removes the package IP address from the LAN card on the current node.

  • The package control script invokes the tkit_module.sh to run the NFS script and to halt the NFS related process.

  • The NFS script un-exports all file systems associated with the package so that they can no longer be NFS-mounted by clients.

  • The NFS script halts the monitor process.

  • The NFS script halts the File Lock Migration synchronization script if you enable the File Lock Migration feature. The NFS daemons are also halted to unmount the filesystem.

  • Unmounts each file system associated with the package.

  • Deactivates each volume group associated with the package.

    NOTE: After completing the above sequence, the NFS package is inactive on the current node and may start up on an alternate node or be restarted later on the same node.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.