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

退出打印视图

更新时间: 2014 年 9 月
 
 

向资源组添加节点

向资源组添加节点时要遵循的过程取决于资源组是可伸缩资源组还是故障转移资源组。有关详细说明,请参见以下各节:

必须提供以下信息才能完成该过程。

  • 所有群集节点的名称和节点 ID

  • 要向其添加节点的资源组的名称

  • 要托管所有节点上资源组都使用的网络资源的 IPMP 组的名称

此外,必须检验新节点是否已经是群集成员。

如何向可伸缩资源组添加节点

  1. 对于资源组中的可伸缩资源使用的每个网络资源,使该网络资源所在的资源组在新节点上运行。

    有关详细信息,请参见以下过程中的Step 1Step 6

  2. 将新节点添加到可以控制可伸缩组的节点列表(nodelist 资源组属性)中。

    此步骤会覆盖以前的 nodelist 值,因此必须在此处包括可以控制资源组的所有节点。

    # clresourcegroup set [-n nodelist] resource-group
    –n nodelist

    指定可以控制此资源组的节点的逗号分隔排序列表。在所有其他节点上,此资源组被切换到脱机状态。

    此列表是可选的。如果省略此列表,则 Nodelist 属性将设置为群集中的所有节点。

    resource-group

    指定要向其添加节点的资源组的名称。

  3. (u53ef选) 更新可伸缩资源的 Load_balancing_weights 属性以便向要添加到资源组的节点分配一个权重。

    否则,权重将默认为 1。有关更多信息,请参见 clresourcegroup(1CL) 手册页。

如何向故障转移资源组添加节点

  1. 显示为资源组中每个资源配置的当前节点列表以及当前 IPMP 组列表。
    # clresourcegroup show -v resource-group | grep -i nodelist
    # clresourcegroup show -v resource-group | grep -i netiflist

    注 -  nodelistnetiflist 的命令行输出按节点名称标识节点。要标识节点 ID,可运行命令 clnode show -v | grep -i node-id
  2. 为受添加节点影响的网络资源更新 netiflist

    此步骤会覆盖以前的 netiflist 值,因此必须在此处包括所有 IPMP 组。

    # clresource set  -p netiflist=netiflist network-resource
    –p netiflist=netiflist

    指定标识每个节点上的 IPMP 组的逗号分隔列表。netiflist 中的每个元素都必须采用 netif@node 格式。netif 可指定为 IPMP 组名,例如 sc_ipmp0。节点可由节点名称或节点 ID 标识,例如 sc_ipmp0@1sc_ipmp@phys-schost-1

    network-resource

    指定在 netiflist 条目中承载的网络资源(逻辑主机名或共享地址)的名称。

  3. 如果 HAStoragePlus AffinityOn 扩展属性值为 True,则将节点添加到相应的磁盘集或设备组。
    • 如果使用的是 Solaris Volume Manager,则可使用 metaset 命令。
      # metaset -s disk-set-name -a -h node-name
      –s disk-set-name

      指定 metaset 命令所针对的磁盘集的名称

      –a

      将驱动器或主机添加到指定的磁盘集

      –h node-name

      指定要添加到磁盘集的节点

  4. 更新节点列表以包括现在可以控制此资源组的所有节点。

    此步骤会覆盖以前的 nodelist 值,因此必须在此处包括可以控制资源组的所有节点。

    # clresourcegroup set [-n nodelist] resource-group
    –n nodelist

    指定可以控制此资源组的节点的逗号分隔排序列表。在所有其他节点上,此资源组被切换到脱机状态。

    此列表是可选的。如果省略此列表,则 Nodelist 属性将设置为群集中的所有节点。

    resource-group

    指定要向其添加节点的资源组的名称。

  5. 检验更新后的信息。
    # clresourcegroup show -v resource-group | grep -i nodelist
    # clresourcegroup show -v resource-group | grep -i netiflist
示例 2-31  向资源组添加节点

以下示例展示了如何将群集节点 phys-schost-2 添加到包含逻辑主机名资源 schost-2 的资源组 resource-group-1

# clresourcegroup show -v resource-group-1 | grep -i nodelist
Nodelist:    phys-schost-1 phys-schost-3
# clresourcegroup show -v resource-group-1 | grep -i netiflist
Res property name: NetIfList
Res property class: extension
List of IPMP
interfaces on each node
Res property type: stringarray
Res property value: sc_ipmp0@1 sc_ipmp0@3

Only nodes 1 and 3 have been assigned IPMP groups. You must add an IPMP group for node 2.

# clresource set  -p netiflist=sc_ipmp0@1,sc_ipmp0@2,sc_ipmp0@3 schost-2


# metaset -s red -a -h phys-schost-2
# clresourcegroup set -n  phys-schost-1,phys-schost-2,phys-schost-3 resource-group-1
# clresourcegroup show -v resource-group-1 | grep -i nodelist
Nodelist:     phys-schost-1  phys-schost-2  phys-schost-3
# clresourcegroup show -v resource-group-1 | grep -i netiflist
Res property value: sc_ipmp0@1 sc_ipmp0@2 sc_ipmp0@3