Sun Cluster Software Installation Guide for Solaris OS

ProcedureHow to Configure an HAStoragePlus Resource for a Cluster File System That is Used by Non-Global Zones

Use this procedure to make a cluster file system available for use by a native brand non-global zone that is configured on a cluster node.


Note –

Use this procedure with only the native brand of non-global zones. You cannot perform this task with any other brand of non-global zone, such as the solaris8 brand or the cluster brand which is used for zone clusters.


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

  2. Create a resource group with a node list of native brand non-global zones.

    • Use the following command to create a failover resource group:


      phys-schost# clresourcegroup create -n node:zone[,…] resource-group
      
      -n node:zone

      Specifies the names of the non-global zones in the resource-group node list.

      resource-group

      The name of the resource group that you create.

    • Use the following command to create a scalable resource group:


      phys-schost# clresourcegroup create -S -n node:zone[,…] resource-group
      
      -S

      Specifies that the resource group is scalable.

  3. Register the HAStoragePlus resource type.


    phys-schost# clresourcetype register SUNW.HAStoragePlus
    
  4. On each global-cluster node where a non-global zone in the node list resides, add the cluster file system entry to the /etc/vfstab file.

    Entries in the /etc/vfstab file for a cluster file system must contain the global keyword in the mount options.

    See Sample Entries in /etc/vfstab for Cluster File Systems in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

  5. Create the HAStoragePlus resource and define the file-system mount points.


    phys-schost# clresource create -g resource-group -t SUNW.HAStoragePlus \
    -p FileSystemMountPoints="mount-point-list" hasp-resource
    
    -g resource-group

    Specifies the name of the resource group that the new resource is added to.

    -p FileSystemMountPoints="mount-point-list"

    Specifies one or more file-system mount points for the resource.

    hasp-resource

    The name of the HAStoragePlus resource that you create.

    The resource is created in the enabled state.

  6. Add a resource to resource-group and set a dependency for the resource on hasp-resource.

    If you have more than one resource to add to the resource group, use a separate command for each resource.


    phys-schost# clresource create -g resource-group -t resource-type \
    -p Network_resources_used=hasp-resource resource
    
    -t resource-type

    Specifies the resource type that you create the resource for.

    -p Network_resources_used=hasp-resource

    Specifies that the resource has a dependency on the HAStoragePlus resource, hasp-resource.

    resource

    The name of the resource that you create.

  7. Bring online and in a managed state the resource group that contains the HAStoragePlus resource.


    phys-schost# clresourcegroup online -M resource-group
    
    -M

    Specifies that the resource group is managed.


Example 7–1 Configuring an HAStoragePlus Resource for a Cluster File System That is Used by Non-Global Zones

The following example creates a failover resource group, cfs-rg, to manage an HA-Apache data service. The resource-group node list contains two non-global zones, sczone1 on phys-schost-1 and sczone1 on phys-schost-2. The resource group contains an HAStoragePlus resource, hasp-rs, and a data-service resource, apache-rs. The file-system mount point is /global/local-fs/apache.


phys-schost-1# clresourcegroup create -n phys-schost-1:sczone1,phys-schost-2:sczone1 cfs-rg
phys-schost-1# clresourcetype register SUNW.HAStoragePlus

Add the cluster file system entry to the /etc/vfstab file on phys-schost-1
phys-schost-1# vi /etc/vfstab
#device            device         mount          FS    fsck    mount    mount
#to mount          to fsck        point          type  pass    at boot  options
#
/dev/md/kappa-1/dsk/d0 /dev/md/kappa-1/rdsk/d0 /global/local-fs/apache ufs 5 yes logging,global
Add the cluster file system entry to the /etc/vfstab file on phys-schost-2
phys-schost-2# vi /etc/vfstab

…
phys-schost-1# clresource create -g cfs-rg -t SUNW.HAStoragePlus \
-p FileSystemMountPoints="/global/local-fs/apache" hasp-rs
phys-schost-1# clresource create -g cfs-rg -t SUNW.apache \
-p Network_resources_used=hasp-rs apache-rs
phys-schost-1# clresourcegroup online -M cfs-rg