Oracle® Solaris Cluster 数据服务规划和管理指南

退出打印视图

更新时间: 2014 年 9 月
 
 

如何为群集文件系统设置 HAStoragePlus 资源

  1. 在群集中的任一节点上,承担可提供 solaris.cluster.modify RBAC 授权的 root 角色。
  2. 根据需要创建故障转移或可伸缩资源组。

    执行以下步骤创建一个故障转移组。

    # clresourcegroup create resource-group

    执行以下步骤创建一个可伸缩组。

    # clresourcegroup create -S [-p Maximum_primaries=m] [-p Desired_primaries=n] \
    [-n node-zone-list] resource-group
  3. 注册 HAStoragePlus 资源类型。
    # clresourcetype register SUNW.HAStoragePlus
  4. 创建 HAStoragePlus 资源并定义文件系统挂载点。
    # clresource create -g resource-group -t SUNW.HAStoragePlus \
    -p FileSystemMountPoints="mount-point-list" hasp-resource

    资源在创建后处于启用状态。

  5. 将数据服务资源添加到 resource-group,并将其依赖性设置为 hasp-resource
    # clresource set -p  Resource_dependencies_offline_restart= \
    hasp-resource application-resource
  6. 使包含 HAStoragePlus 资源的资源组联机并处于受管状态。
    # clresourcegroup online -M resource-group
示例 2-34  在全局群集中设置使用群集文件系统的 HAStoragePlus 资源类型

此示例展示了如何在全局群集中为故障转移资源组配置使用群集文件系统的 /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