Sun Cluster 3.0 5/02 补编

如何设置 RGOffload 资源 (5/02)

在 Sun Cluster 3.0 5/02 更新版中进行了以下更改,它适用于本更新版和 Sun Cluster 3.0 软件的所有后续更新版。

  1. 成为某个群集成员的超级用户。

  2. 确定是否已注册 RGOffload 资源类型。

    以下命令将打印一个资源类型列表。


    # scrgadm -p|egrep SUNW.RGOffload
    

  3. 如果需要,注册此资源类型。


    # scrgadm -a -t SUNW.RGOffload
    
    .

  4. 在 RGOffload 资源所要卸载的每个资源组中,将 Desired_primaries 设置为 0。


    # scrgadm -c -g offload-rg -y Desired_primaries=0
    

  5. 将 RGOffload 资源添加到关键的故障转移资源组中,并设置扩展特性。


    Caution - Caution -

    请勿将一个资源组放在多个资源的 rg_to_offload 列表中。如果将一个资源组放在多个 rg_to_offload 列表中,可能会使该资源组脱机然后再返回联机状态,并反复重复此过程。


    有关扩展特性的说明,请参阅"配置 RGOffload 扩展特性 (5/02)"


    # scrgadm -aj rgoffload-resource -t SUNW.RGOffload -g critical-rg \
    -x rg_to_offload=offload-rg-1, offload-rg-2, ... \
    -x continue_to_offload=TRUE -x max_offload_retry=15
    


    注意:

    此处列出的是除 rg_to_offload 以外的扩展特性及其缺省值。rg_to_offload 是一个用逗号分隔的资源组列表,其中各个资源组之间相互保持独立。此列表中不能包含那个正要向其中添加 RGOffload 资源的资源组。


  6. 启用 RGOffload 资源。


    # scswitch -ej rgoffload-resource
    

  7. 设置关键的故障转移资源,使其与 RGOffload 资源相关。


    # scrgadm -c -j critical-resource \
    -y Resource_dependencies=rgoffload-resource
    

    也可以使用 Resource_dependencies_weak。如果对 RGOffload 资源类型使用 Resource_dependencies_weak,则即使在卸载 offload-rg 时出现错误,也能启动关键的故障转移资源。

  8. 使所要卸载的资源组联机。


    # scswitch -z -g offload-rg, offload-rg-2, ... -h nodelist
    

    在关键资源组已经脱机的所有节点上,该资源组将保持联机状态。故障监视器可防止该资源组在具有以下特点的节点上运行:其中的关键资源组仍处于联机状态。

    由于所要卸载的资源组的 Desired_primaries 已设置为 0(请参阅步骤 4),-Z 选项不能使这些资源组联机。

  9. 如果关键的故障转移资源组没有联机,将使它联机。


    # scswitch -Z -g critical-rg
    

示例 - 配置 RGOffload 资源

此示例说明如何配置 RGOffload 资源 (rgofl)、含有 RGOffload 资源 (oracle_rg) 的关键资源组以及在关键资源组联机时被卸载的可缩放资源组 (IWS-SC, IWS-SC-2)。此示例中的关键资源为 oracle-server-rs

在此示例中,可以在任何一个群集 triped 节点上控制 oracle_rgIWS-SCIWS-SC-2phys-triped-1phys-triped-2phys-triped-3


[Determine whether the SUNW.RGOffload resource type is registered.]
# scrgadm -p|egrep SUNW.RGOffload
 
[If needed, register the resource type.]
# scrgadm -a -t SUNW.RGOffload
 
[Set the Desired_primaries to zero in each resource group to be offloaded by 
the RGOffload resource.]
# scrgadm -c -g IWS-SC-2 -y Desired_primaries=0
# scrgadm -c -g IWS-SC -y Desired_primaries=0
 
[Add the RGOffload resource to the critical resource group and set the extension properties.]
# scrgadm -aj rgofl -t SUNW.RGOffload -g oracle_rg \
-x rg_to_offload=IWS-SC,IWS-SC-2 -x continue_to_offload=TRUE \
-x max_offload_retry=15
 
[Enable the RGOffload resource.]
# scswitch -ej rgofl
 
[Set the dependency of the critical failover resource to the RGOffload resource.]
# scrgadm -c -j oracle-server-rs -y Resource_dependencies=rgofl
 
[Bring the resource groups to be offloaded online on all nodes.]
# scswitch -z -g IWS-SC,IWS-SC-2 -h phys-triped-1,phys-triped-2,phys-triped-3
 
[If the critical failover resource group is not online, bring it online.]
# scswitch -Z -g oracle_rg