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

How to Change Share Options on an NFS File System

If you use the rw, rw=, ro, or ro= options to the share -o command, NFS fault monitoring works best if you grant access to all of the physical hosts or netgroups that are associated with all of the Sun Cluster servers.

If you use netgroups in the share(1M) command, add all of the Sun Cluster hostnames to the appropriate netgroup. Ideally, grant both read access and write access to all of the Sun Cluster hostnames to enable the NFS fault probes to do a complete job.


Note –

Before you change share options, read the share_nfs(1M) man page to understand which combinations of options are legal.


You can also modify shared paths and options dynamically without bringing offline the Sun Cluster HA for NFS resource. See How to Dynamically Update Shared Paths on an NFS File System.

To modify the share options on an NFS file system while the Sun Cluster HA for NFS resource is offline, perform the following steps.

  1. Become superuser on a cluster node.

  2. Turn off fault monitoring on the NFS resource.


    # scswitch -n -M -j resource
    
    -M

    Disables the resource fault monitor

  3. Test the new share options.

    1. Before you edit the dfstab.resource file with new share options, execute the new share command to verify the validity of your combination of options.


      # share -F nfs [-o] specific_options [-d “description”] pathname
      
      -F nfs

      Identifies the file system type as NFS.

      -o specific_options

      Specifies an option. You might use rw, which grants read-write access to all of the clients.

      -d description

      Describes the file system to add.

      pathname

      Identifies the file system to share.

    2. If the new share command fails, immediately execute another share command with the old options. When the new command executes successfully, proceed to Step 4.

  4. Edit the dfstab.resource file with the new share options.

    1. To remove a path from the dfstab.resource file, perform the following steps in order.

      1. Execute the unshare(1M) command.

      2. From the dfstab.resource file, delete the share command for the path that you want to remove.


      # unshare [-F nfs] [-o specific_options] pathname
      # vi dfstab.resource
      
      -F nfs

      Identifies the file system type as NFS.

      -o specific_options

      Specifies the options that are specific to NFS file systems.

      pathname

      Identifies the file system that is made unavailable.

    2. To add a path or change an existing path in the dfstab.resource file, verify that the mount point is valid, then edit the dfstab.resource file.


    Note –

    The format of this file is exactly the same as the format that is used in the /etc/dfs/dfstab file. Each line consists of a share command.


  5. Enable fault monitoring on the NFS resource.


    # scswitch -e -M -j resource