执行以下步骤创建一个故障转移组。
# clresourcegroup create resource-group
执行以下步骤创建一个可伸缩组。
# clresourcegroup create -S [-p Maximum_primaries=m] [-p Desired_primaries=n] \ [-n node-zone-list] resource-group
# clresourcetype register SUNW.HAStoragePlus
# clresource create -g resource-group -t SUNW.HAStoragePlus \ -p FileSystemMountPoints="mount-point-list" hasp-resource
资源在创建后处于启用状态。
# clresource set -p Resource_dependencies_offline_restart= \ hasp-resource application-resource
# clresourcegroup online -M resource-group
此示例展示了如何在全局群集中为故障转移资源组配置使用群集文件系统的 /global/ufs HAStoragePlus 资源。
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/apachedg/dsk/d0 /dev/md/apachedg/rdsk/d0 /global/ufs ufs 2 yes global, logging # clresourcegroup create hasp-rg # clresourcetype register SUNW.HAStoragePlus # clresource create -g hasp-rg -t SUNW.HAStoragePlus -p \ FileSystemMountPoints=/global/ufs hasp-rs # clresourcegroup online -M hasp-rg示例 2-35 在区域群集中设置使用群集文件系统的 HAStoragePlus 资源类型
此示例展示了如何在区域群集中为可伸缩资源组配置使用群集文件系统的 /global/ufs HAStoragePlus 资源。此群集文件系统可供挂载点 /zone/ufs 上的区域群集节点使用。此示例配置使全局文件系统 /global/ufs 挂载在全局群集中,并稍后回送挂载在资源组联机的两个区域群集节点上。
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/apachedg/dsk/d0 /dev/md/apachedg/rdsk/d0 /global/ufs ufs 2 yes global, logging # clzonecluster configure sczone clzc:sczone> add fs clzc:sczone:fs> set dir=/zone/ufs clzc:sczone:fs> set special=/global/ufs clzc:sczone:fs> set type=lofs clzc:sczone:fs> end clzc:sczone:fs> exit # clresourcegroup create -Z sczone -p desired_primaries=2 -p maximum_primaries=2 hasp-rg # clresourcetype register -Z sczone SUNW.HAStoragePlus # clresource create -Z sczone -g hasp-rg -t SUNW.HAStoragePlus -p FileSystemMountPoints=/zone/ufs hasp-rs # clresourcegroup online -Z sczone -M hasp-rg