Go to main content

Oracle® Solaris Cluster 4.3 Data Services Planning and Administration Guide

Exit Print View

Updated: April 2016
 
 

How to Set Up the HAStoragePlus Resource Type to Share a Highly Available Local File System Directory to a Zone Cluster

The following procedure explains how to set up the HAStoragePlus resource type to share a highly available local file system (for example, UFS or QFS) or a ZFS pool directory to a zone cluster called zone-cluster-name.

  1. On any node in the global cluster, assume the root role that provides solaris.cluster.modify RBAC authorization.

    Perform the steps from a node in the global cluster, because the dependencies and affinities from a zone cluster to a global cluster can only be set by an authorized cluster node administrator.

  2. Create a failover resource group in the global cluster.
    # clresourcegroup create gc-hasp-resource-group
  3. Register the HAStoragePlus resource type in the global cluster.
    # clresourcetype register SUNW.HAStoragePlus
  4. Create an HAStoragePlus resource in a failover resource group of the global cluster with the highly available local file system that contains the directory that you want to share to a zone cluster.
    # clresource create -g gc-hasp-resource-group -t HAStoragePlus \
    -p FilesystemMountPoints=mount-point \
    -p Zpools=pool gc-hasp-resource
  5. Bring the global cluster failover resource group online.
    # clresourcegroup online -M gc-hasp-resource-group
  6. Configure the directory of the highly available local file system that is being shared to the zone cluster as an lofs file system.
    # clzonecluster configure zoneclustername
    clzc:zoneclustername> add fs
    clzc:zoneclustername:fs> set dir = shared-dir-mount-point-in-zc
    clzc:zoneclustername:fs> set special = shared-directory
    clzc:zoneclustername:fs> set type = lofs
    clzc:zoneclustername:fs> end
    clzc:zoneclustername> exit
    #
  7. Create a failover resource group in the zone cluster that has a strong positive affinity or strong positive affinity with failover delegation on the failover resource group of the global cluster.
    # clresourcegroup create -Z zoneclustername \
    -p RG_affinities=++global:gc-hasp-resource-group \
    zc-hasp-resource-group
    OR
    # clresourcegroup create -Z zoneclustername \
    -p RG_affinities=+++global:gc-hasp-resource-group zc-hasp-resource-group
  8. Register the HAStoragePlus resource type in the zone cluster.
    # clresourcetype register -Z zoneclustername SUNW.HAStoragePlus
  9. Create an HAStoragePlus resource in a failover resource group of the zone cluster. Configure the zone cluster with the lofs file system for a shared directory with a dependency on the global cluster resource that you want to share to the zone cluster.
     # clresource create -Z zoneclustername -t SUNW.HAStoragePlus -g zc-hasp-resource-group \
    -p FilesystemMountPoints=shared-dir-mount-point-in-zc \
    -p Resource_dependencies_offline_restart=global:gc-hasp-resource zc-hasp-resource
  10. Bring the zone cluster failover resource group online.
    # clresourcegroup online -Z zoneclustername -M zc-hasp-resource-group
Example 50  Setting Up the HAStoragePlus Resource Type to Share a UFS Highly Available Local File System Directory to a Zone Cluster

The following example shows how to share the /local/fs/home directory of a UFS highly available local file system (/local/fs) to a zone cluster called sczone.

# clresourcegroup create gc-hasp-rg
# clresourcetype register -Z sczone SUNW.HAStoragePlus
# vi /etc/vfstab /dev/md/dg1/dsk/d0 /dev/md/dg1/rdsk/d0 /local/fs ufs 2 no logging
# clresource create -g gc-hasp-rg -t SUNW.HAStoragePlus \
-p FilesystemMountPoints=/local/fs gc-hasp-rs
# clresourcegroup online -M gc-hasp-rg

The steps above ensure that the gc-hasp-rs resource running in the global cluster manages the highly available local file system /local/fs.

# clzonecluster configure sczone
clzc:sczone> add fs
clzc:sczone:fs> set dir = /share/local/fs/home
clzc:sczone:fs> set special = /local/fs/home
clzc:sczone:fs> set type = lofs
clzc:sczone:fs> end
clzc:sczone> exit

The configuration above makes the highly available local file system's directory /local/fs/home available in the zone cluster sczone at mount point /share/local/fs/home.

# clresourcegroup create -Z sczone \
-p RG_affinities=++global:gc-hasp-rg zc-hasp-rg
# clresourcetype register -Z sczone SUNW.HAStoragePlus
# clresource create -Z sczone -t HAStoragePlus -g zc-hasp-rg \
-p FilesystemMountPoints=/share/local/fs/home \
-p Resource_dependencies_offline_restart=global:gc-hasp-rs zc-hasp-rs 
# clresourcegroup online -Z sczone -M zc-hasp-rg

The steps above create a zone cluster resource that manages the shared directory as an lofs file system. The steps in this example are applicable to QFS file systems.

Example 51  Setting Up the HAStoragePlus Resource Type to Share a ZFS Pool Directory to a Zone Cluster

The following example shows how to share the ZFS pool "tank" directory /tank/home to a zone cluster called sczone.

# clresourcegroup create gc-hasp-rg
# clresourcetype register SUNW.HAStoragePlus
# clresource create -g gc-hasp-rg -t SUNW.HAStoragePlus \
-p Zpools=tank gc-hasp-rs
# clresourcegroup online -M gc-hasp-rg

The steps above ensure that the ZFS highly available local file system is managed by gc-hasp-rs running in the global cluster.

# clzonecluster configure sczone
clzc:sczone> add fs
clzc:sczone:fs> set dir = /share/tank/home
clzc:sczone:fs> set special = /tank/home
clzc:sczone:fs> set type = lofs
clzc:sczone:fs>end
clzc:sczone> exit
#

The configuration above makes the ZFS pool "tank" directory /tank/home available in the zone cluster sczone at mount point /share/tank/home.

 # clresourcegroup create -Z sczone \
-p RG_affinities=++global:gc-hasp-rg zc-hasp-rg
# clresourcetype register -Z sczone SUNW.HAStoragePlus
# clresource create -Z sczone -t HAStoragePlus -g zc-hasp-rg \
-p FilesystemMountPoints=/share/tank/home \
-p Resource_dependencies_offline_restart=global:gc-hasp-rs zc-hasp-rs
# clresourcegroup online -Z sczone -M zc-hasp-rg

The steps above create a zone cluster resource that manages the shared directory as an lofs file system.