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。若將 Resource_dependencies_weak 用在 RGOffload 資源類型上,則即使卸載 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