Sun Cluster 2.2 Software Installation Guide

11.2.1 How to Share NFS File Systems


Note -

NFS file systems are not shared until you perform a cluster reconfiguration as outlined in "11.2.2 How to Register and Activate NFS".


  1. Create the multihost file systems.

    Use the procedures described in Appendix B, Configuring Solstice DiskSuite, and in Appendix C, Configuring Sun StorEdge Volume Manager and Cluster Volume Manager, to create the multihost file systems.

  2. Verify that all nodes in the cluster are up and running.

  3. From a cconsole(1) window, use an editor such as vi to create and edit the /etc/opt/SUNWcluster/conf/hanfs/dfstab.logicalhost file.

    By using a cconsole(1) window, you can make changes on all the potential masters of these file systems. You can also update dfstab.logicalhost on one node and use rcp(1) to copy it to all other cluster nodes that are potential masters of the file systems. Add entries for all files systems created in "" that will be shared.

    The dfstab.logicalhost file is in dfstab format. The file contains share(1M) commands in this syntax.

    share [-F fstype] [-o options] [-d "<text>"] <pathname> [resource]

    If you use the rw, rw=, ro, or ro= options to the share -o command, grant access to all hostnames that Sun Cluster uses. This enables Sun Cluster HA for NFS fault monitoring to operate most efficiently. Include all physical and logical hostnames that are associated with the Sun Cluster, as well as the hostnames on all public networks to which the Sun Cluster is connected.

    If you use netgroups in the share command (rather than names of individual hosts), add all those cluster hostnames to the appropriate netgroup.


    Note -

    Do not grant access to the hostnames on the private nets.


    Grant read and write access to all the hosts' hostnames, to enable the HA-NFS monitoring to do a thorough job. However, you can restrict write access to the file system, or make the file system entirely read-only. In this case, Sun Cluster HA for NFS fault monitoring will still be able to perform monitoring without having write access.

    The resulting file will look similar to this example, which shows the logical host name (hahost1), the file system type (nfs), and the mount point names (/hahost1/1 and /hahost1/2).

    share  -F nfs  -d "hahost1 fs 1" /hahost1/1
     share  -F nfs  -d "hahost1 fs 2" /hahost1/2

    Note -

    When constructing share options, generally avoid using the -root option, and avoid mixing -ro and -rw options.


  4. (Optional) Create the file .probe_nfs_file in each directory to be NFS-shared.

    For enhanced fault monitoring, each directory exported by Sun Cluster HA for NFS (that is, each directory listed in the dfstab files for Sun Cluster HA for NFS) should contain the file .probe_nfs_file. For each such directory, cd to the directory and create the file using the touch(1) command:

    Do this on the physical host that currently masters the logical host for that dfstab file.

    phys-hahost1# touch .probe_nfs_file 
    

    After completing these steps, register and activate NFS using the procedure "11.2.2 How to Register and Activate NFS".