Sun Cluster Data Service for NFS Guide for Solaris OS

ProcedureHow 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 the physical hosts or netgroups that are associated with all the Sun Cluster servers.

If you use netgroups in the share(1M) command, add all the Sun Cluster hostnames to the appropriate netgroup. Ideally, grant both read access and write access to all 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 the shared path 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. On a cluster member, become superuser or assume a role that provides solaris.cluster.admin RBAC authorization.

  2. Turn off fault monitoring on the NFS resource.


    # clresource unmonitor resource
    
  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 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.


        # unshare -F nfs  [-o specific_options] pathname
        
        -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. From the dfstab.resource file, delete the share command for the path that you want to remove.


        # vi dfstab.resource
        
    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.


    # clresource monitor resource