Sun Cluster Data Service for NFS Guide for Solaris OS

ProcedureHow to Set Up the HAStoragePlus Resource Type for an NFS-Exported Zettabyte File System

The following procedure uses a simple NFS service.

See Creating a ZFS Storage Pool in Solaris ZFS Administration Guide for information about how to create a ZFS pool. See Creating a ZFS File System Hierarchy in Solaris ZFS Administration Guide for information about how to create a ZFS in that ZFS pool.

  1. On a cluster node, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Determine whether the HAStoragePlus resource type and the SUNW.nfs resource type are registered.

    The following command prints a list of registered resource types.


    # clresourcetype list
    
  3. If necessary, register the HAStoragePlus resource type and the SUNW.nfs resource type.


    # clresourcetype register SUNW.HAStoragePlus SUNW.nfs
    
  4. Create the failover resource group.


    # clresourcegroup create -p PathPrefix=path resource-group
    
  5. Create a logical host resource of type SUNW.LogicalHostname.


    # clreslogicalhostname create -g resource-group \
    -h logical-hostname logicalhost-resource
    

    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  6. Create the ZFS resource of type HAStoragePlus.


    # clresource create -g resource-group -t SUNW.HAStoragePlus \
    -p Zpools=zpool HASP-resource
    

    The resource is created in the enabled state.


    Note –

    You can specify a list of one or more ZFS pools for the Zpools extension property.


  7. Bring online the resource group on a cluster node in a managed state.

    The node on which the resource group is brought online becomes the primary node for the ZFS. The ZFS pool zpool is imported on this node. The ZFS is consequently mounted locally on this node.


    # clresourcegroup online -M resource-group
    
  8. Create the resource of type SUNW.nfs and specify its resource dependency on the resource of type SUNW.HAStoragePlus.

    The file dfstab.nfs-rs must be present in zpool/nfs/SUNW.nfs.


    # clresource create -g resource-group -t SUNW.nfs \
    -p Resource_dependencies=HASP-resource NFS-resource
    

    The resource is created in the enabled state.


    Note –

    Before you can set the dependency in the NFS-resource resource, the HASP-resource resource must be online.


  9. Bring online the resource-group group on a cluster node in a managed state.


    # clresourcegroup online -M resource-group
    

Example 2 Setting Up the HAStoragePlus Resource Type for an NFS-Exported ZFS

The following example uses a simple NFS service. The example assumes the following:


phys-schost-1% su
Password: 
# clresourcetype list
SUNW.LogicalHostname:2
SUNW.SharedAddress:2
# clresourcetype register SUNW.HAStoragePlus SUNW.nfs
# clresourcegroup create -p PathPrefix=/nfszpool/nfs nfs-rg
# clreslogicalhostname create -g nfs-rg -h log-nfs nfs-lh-rs
# clresource create -g nfs-rg -t SUNW.HAStoragePlus \
                    -p Zpools=nfszpool nfs-hastp-rs
# clresourcegroup online -M nfs-rg
# clresource create -g nfs-rg -t SUNW.nfs \
                    -p Resource_dependencies=nfs-hastp-rs nfs-rs
# clresourcegroup online -M nfs-rg