Go to main content

Oracle® Solaris Cluster 4.3 System Administration Guide

Exit Print View

Updated: June 2017
 
 

How to Create an NFS Application Resource Group on the Primary Cluster

This procedure describes how application resource groups are created for NFS. This procedure is specific to this application and cannot be used for another type of application.

Before You Begin

  1. Access nodeA as the role that provides solaris.cluster.modify, solaris.cluster.admin, and solaris.cluster.read authorization.
  2. Register SUNW.nfs as a resource type.
    nodeA# clresourcetype register SUNW.nfs
  3. If SUNW.HAStoragePlus has not been registered as a resource type, register it.
    nodeA# clresourcetype register SUNW.HAStoragePlus
  4. Create an application resource group for the NFS service.
    nodeA# clresourcegroup create \
    -p Pathprefix=/global/etc \
    -p Auto_start_on_new_cluster=False \
    -p RG_affinities=+++devgrp-stor-rg \
    nfs-rg
    Pathprefix=/global/etc

    Specifies the directory into which the resources in the group can write administrative files.

    Auto_start_on_new_cluster=False

    Specifies that the application resource group is not started automatically.

    RG_affinities=+++devgrp-stor-rg

    Specifies the resource group with which the application resource group must be collocated. In this example, the application resource group must be collocated with the replication resource group devgrp-stor-rg.

    If the replication resource group is switched over to a new primary node, the application resource group is automatically switched over. However, attempts to switch over the application resource group to a new primary node are blocked because that action breaks the collocation requirement.

    nfs-rg

    The name of the application resource group.

  5. Add a SUNW.HAStoragePlus resource to the application resource group.
    nodeA# clresource create -g nfs-rg \
    -t SUNW.HAStoragePlus \
    -p FileSystemMountPoints=/global/mountpoint \
    -p AffinityOn=True \
    nfs-dg-rs
    create

    Creates the resource.

    –g

    Specifies the resource group to which the resource is added.

    -t SUNW.HAStoragePlus

    Specifies that the resource is of the type SUNW.HAStoragePlus.

    -p FileSystemMountPoints=/global/mountpoint

    Specifies that the mount point for the file system is global.

    -p AffinityOn=True

    Specifies that the application resource must perform an affinity switchover for the global devices and cluster file systems defined by -p FileSystemMountPoints. Therefore, when the application resource group fails over or is switched over, the associated device group is switched over.

    nfs-dg-rs

    The name of the HAStoragePlus resource for the NFS application.

    For more information about these extension properties, see the SUNW.HAStoragePlus(5) man page.

  6. Add a logical hostname resource to the application resource group.
    nodeA# clreslogicalhostname create -g nfs-rg \
    lhost-nfsrg-prim

    The logical hostname of the application resource group on the primary cluster is named lhost-nfsrg-prim.

  7. Create the dfstab.resource-name configuration file and place it in the SUNW.nfs subdirectory under the Pathprefix directory of the containing resource group.
    1. Create a directory called SUNW.nfs on nodeA.
      nodeA# mkdir -p /global/etc/SUNW.nfs
    2. Create a dfstab.resource-name file on nodeA.
      nodeA# touch /global/etc/SUNW.nfs/dfstab.nfs-rs
    3. Add the following line to the /global/etc/SUNW.nfs/dfstab.nfs-rs file on nodeA.
      share -F nfs -o rw -d "HA NFS" /global/mountpoint
  8. Bring the application resource group online.
    nodeA# clresourcegroup online -M -n nodeA nfs-rg
    online

    Brings the resource group online.

    –e

    Enables the associated resources.

    –M

    Manages the resource group.

    –n

    Specifies the node on which to bring the resource group online.

    nfs-rg

    The name of the resource group.

  9. Verify that the application resource group is online.
    nodeA# clresourcegroup status

    Examine the resource group state field to determine whether the application resource group is online for nodeA and nodeB.

Next Steps

Go to How to Create an NFS Application Resource Group on the Secondary Cluster.