Go to main content

Oracle® Solaris Cluster Data Service for NFS Guide

Exit Print View

Updated: January 2016
 
 

How to Dynamically Update Shared Paths on an NFS File System

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

Ensure that the paths that are shared are always available to 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 HA for NFS resource, and the dependency between them must be set correctly.

  1. Use the cluster status command to find out the node on which the HA for NFS resource is online.
  2. On this node, run the /usr/sbin/share command to see the list of paths currently shared and determine the changes 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.

      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 ensures that the shared paths are available to potential clients. HA for NFS detects that the newly added path is already shared and does not report an error.

  4. To unshare a path, perform the following steps.
    1. Run the dfmounts 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 receive a stale file error handle and would need special care (forced unmount, or even reboot) to recover.

    2. Remove the share command 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.