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 Control Scripts work in Legacy Packages

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

As with all legacy Serviceguard packages, the package control scripts start and stop the NFS package and determine how the package will operate once it becomes available on a particular node. Each control script contains two sets of code that operate depending on whether the script is called with the start parameter or the stop parameter.

A template package control script pkg.cntl can be generated by using cmmakepkg -s pkg.cntl. The template script hanfs.sh is provided in /usr/local/cmcluster/nfstoolkit directory for Red Hat environments, and /opt/cmcluster/nfstoolkit for SLES environments.

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.

For information on how to modify this package control script template file for your own packages, refer to “Editing the Package Control Scripts (pkg.cntl)” and “Editing the NFS Configuration File (hanfs.conf)” .

Starting the NFS Services

When called with the start parameter, the package control script does the following:

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

  • Mount each file system associated with the package.

  • Invoke 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.

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

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

After this 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 call the NFS control script with the lock_migration:<IP_address> parameter after enabling the File Lock Migration feature, the control script does the following:

  • 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 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 toolkit.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.

After this 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.