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.
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.
# clresourcegroup create gc-hasp-resource-group
# clresourcetype register SUNW.HAStoragePlus
# clresource create -g gc-hasp-resource-group -t HAStoragePlus \ -p FilesystemMountPoints=mount-point \ -p Zpools=pool gc-hasp-resource
# clresourcegroup online -M gc-hasp-resource-group
# 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 #
# 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
# clresourcetype register -Z zoneclustername SUNW.HAStoragePlus
# 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
# clresourcegroup online -Z zoneclustername -M zc-hasp-resource-group
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 ClusterThe 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.