Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster Data Services Planning and Administration Guide Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

## Sharing a Highly Available Local File System Across Zone Clusters

You can use the `SUNW.HAStoragePlus` resource type to share a highly available local file system directory managed by a global cluster resource to a zone cluster. This method consolidates the storage and shares a highly available local file system with different applications running on different zone clusters. For information on adding a file system to a zone cluster, see Adding File Systems to a Zone Cluster in Oracle Solaris Cluster Software Installation Guide.

This section explains the requirements and procedures for sharing a highly available local file system directory across zone clusters.

### Configuration Requirements for Sharing a Highly Available Local File System Directory to a Zone Cluster

The directory of a highly available local file system managed by a global cluster resource can be shared to a zone cluster. To share a highly available local file system directory, the configuration must meet the following requirements:

- Create an `HAStoragePlus` resource in a failover resource group in a global cluster with the file system where the directory to be shared belongs.

- The directory of the highly available local file system that you want to share must be configured to a zone cluster as an `lofs` file system.

- Create an `HAStoragePlus` resource in a failover resource group in a zone cluster with the `lofs` file system.

- The zone cluster resource must have an offline restart dependency on the global cluster resource.

- The zone cluster resource's resource group must have a strong positive affinity or strong positive affinity with failover delegation on the global cluster resource's resource group.

Note - The applications sharing a highly available local file system will experience an availability impact due to collocation of the applications. An application failure on a node and its intent to fail over might have a cascading effect on other applications and the applications would be forced to fail over to another node. Mitigate the problem by reducing the number of applications that are sharing the file system. If the file system that is being shared is UFS, you can choose to configure the cluster file system to a zone cluster. See How to Set Up the `HAStoragePlus` Resource for Cluster File Systems.

## How to Set Up the HAStorage Plus 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 a ZFS pool directory to a zone cluster called zoneclustername.

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 2-41 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.

Example 2-42 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 mountpoint /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.

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |