Sun Cluster Data Service for Network File System (NFS) Guide for Solaris OS

How to Dynamically Update Shared Paths on an NFS File System

You can dynamically modify the shared paths on an NFS file system without bringing offline the Sun Cluster HA for NFS resource. The general procedure consists of modifying the dfstab.resource file for Sun Cluster HA for NFS and then manually running the appropriate command, either the share command or the unshare command. The command is immediately effective, and Sun Cluster HA for NFS handles making these paths highly available.

Ensure that the paths that are shared are always available to Sun Cluster HA for NFS during failover so that local paths (on non-HA file systems) are not used.

If paths on a file system that is managed by HAStoragePlus are shared, the HAStoragePlus resource must be in the same resource group as the Sun Cluster HA for NFS resource, and the dependency between them must be set correctly.

  1. Use the scstat -g command to find out the node on which the Sun Cluster HA for NFS resource is online.

  2. On this node run the /usr/sbin/share command to see the list of paths currently shared. Determine the changes you want to make to this list.

  3. To add a new shared path, perform the following steps.

    1. Add the share command to the dfstab.resource file.

      Sun Cluster HA for NFS shares the new path the next time it checks the file. The frequency of these checks is controlled by the Thorough_Probe_Interval property (by default 120 seconds).

    2. Run the share command manually to make the newly added shared path effective immediately. Running the command manually is recommended because the user can be certain that the shared paths are available to potential clients. Sun Cluster HA for NFS detects that the newly added path is already shared and does not complain.

  4. To unshare a path, perform the following steps.

    1. Run the dfmounts(1M) command to ensure that no clients are currently using the path.

      Although a path can be unshared even if clients are using it, these clients would get a stale file error handle and would need special care (forced umount, or even reboot) to recover.

    2. Remove the shared path from the dfstab.resource file.

    3. Run the unshare command manually.

  5. To modify options for an existing shared path, perform the following steps.

    1. Modify the dfstab.resource file as needed.

    2. Run the appropriate command (share or unshare) manually.