Introduction ------------ This directory includes a set of scripts that implements HA-NFS using GPFS as the file system. Network Setup ------------- Setup an IP address for the GPFS cluster, and a separate set of IP addresses (one or more) for NFS serving. Use static IP address. DHCP can not be used. Dependencies ------------ (1) Linux heartbeat (2) Kernel patch for lockd. (until the code is included in the kernel) (3) Fixed sm-notify (until SuSe release the fixed version) Cluster Setup ------------- 1. Create a GPFS cluster and file systems. 2. Create a small file system for the HA-NFS shared files. This file system should be configured to be mounted when GPFS starts (mmcrfs -A yes). 3. Add all file systems but the one for HA-NFS to /etc/exports. 4. Stop the GPFS cluster on all nodes with mmshutdown -a or on one node use /etc/init.d/gpfs stop 5. Modify .sample files appropriately and copy them to /var/mmfs/etc (drop the .sample extension) cp -p /usr/lpp/mmfs/samples/nfscluster/nfsdefs.sample /var/mmfs/etc/nfsdefs cp -p /usr/lpp/mmfs/samples/nfscluster/nfs.nodes.sample /var/mmfs/etc/nfs.nodes cp -p /usr/lpp/mmfs/samples/nfscluster/alert.sample /var/mmfs/etc/alert 6. Edit nfsdefs; use the fields as described in the file. 7. Edit nfs.nodes; each line is a mapping between GPFS IP address and NFS IP address(es). One line for every node in the NFS cluster. 8. Edit alert is optional. This script is invoked to alert an administrator that something is wrong with the NFS cluster. Edit this file to match your needs. 9. To complete configuration of GPFS and Linux for HA-NFS on all nodes run the following on one node. /usr/lpp/mmfs/samples/nfscluster/install_ha-nfs.sh -a /var/mmfs/etc/nfsdefs /var/mmfs/etc/nfs.nodes 10. Start the GPFS cluster. mmstartup -a Notes ----- Configure GPFS as an HA-NFS cluster: The following option are already set by install_ha-nfs.sh script. For better read performance of big files set the following option. mmchconfig nfsprefetchstrategy=1 To get faster recovery time: Current lease time and wait time are 35 second. Set leaserecoverywait to no less than 10 second. mmchconfig leaserecoverywait=10 Set leaseDuration to no less than 20 second. mmchconfig leaseDuration=20 user exits: mmfsup, mmfsup.scr, mmfsdown, and mmfsdown.scr are used by HA-NFS all old scripts in /var/mmfs/etc are saved in /var/mmfs/etc.bak After HA-NFS installation the user can add a calls to its exits from mmfsup.scr or mmfsdown.scr The user should NOT create an mmfsup or mmfsdown scripts for now. bonding: If bonding is used add an entry like the following to ifcfg file for correct monitoring by mii-tool. BONDING_MODULE_OPTS='miimon=100 mode=1 use_carrier=0' Clean-up: If GPFS or some other component terminated abnormally you can try the following command to avoid reboot. (reboot is recommended) /var/mmfs/etc/cleanup nfs.nodes example: # The first column is the IP addresses used for the GPFS cluster. # The second column is the IP addresses used to export NFS. 192.168.2.13 9.1.140.65 192.168.2.14 9.1.140.66 192.168.1.15 9.1.140.67