Sun Cluster 3.0 5/02 增補

使用標準 Sun Cluster 管理指令建立使用 GDS 的服務

本節說明如何將上述參數實際輸入 GDS。以現有的 Sun Cluster 管理指令如 scrgadmscswitch,使用與管理 GDS。

如果驅動程序檔提供足夠的功能,就不需要輸入本節所示之較低層級管理指令。然而,如果要更嚴密控制 GDS 型資源,便可以這麼做。這裡有一些實際由驅動程序檔所執行的指令。

標準 Sun Cluster 管理指令使用 GDS 建立高可用性的服務
  1. 註冊 SUNW.gds 資源類型。


    # scrgadm -a -t SUNW.gds
    

  2. 建立包含 LogicalHostname 資源與故障轉移服務本身的資源群組。


    # scrgadm -a -g haapp_rg
    

  3. 建立 LogicalHostname 資源的資源。


    # scrgadm -a -L -g haapp_rs -l hhead
    

  4. 建立故障轉移服務本身的資源。


    # scrgadm -a -j haapp_rs -g haapp_rg -t SUNW.gds \
         -y Scalable=false -y Start_timeout=120 \
         -y Port_list="2222/tcp" \
         -x Start_command="/export/ha/appctl/start" \
         -x Stop_command="/export/ha/appctl/stop" \
         -x Probe_command="/export/app/bin/probe" \
         -x Child_mon_level=0 -y Network_resources_used=hhead \
         -x Failover_enabled=true -x Stop_signal=9
    

  5. haapp_rg 資源群組上線運作。


    # scswitch -Z -g haapp_rg
    

標準 Sun Cluster 管理指令使用 GDS 建立可延伸的服務
  1. 註冊 SUNW.gds 資源類型。


    # scrgadm -a -t SUNW.gds
    

  2. 建立 SharedAddress 資源的資源群組。


    # scrgadm -a -g sa_rg
    

  3. sa_rg 建立 SharedAddress 資源。


    # scrgadm -a -S -g sa_rg -l hhead
    

  4. 建立可延伸服務的資源群組。


    # scrgadm -a -g app_rg -y Maximum_primaries=2 \
    -y Desired_primaries=2 -y RG_dependencies=sa_rg
    

  5. 建立可延伸服務本身的資源群組。


    # scrgadm -a -j app_rs -g app_rg -t SUNW.gds \
         -y Scalable=true -y Start_timeout=120 \
         -y Stop_timeout=120 -x Probe_timeout=120 \
         -y Portlist="2222/tcp" \
         -x Start_command="/export/app/bin/start" \
         -x Stop_command="/export/app/bin/stop" \
         -x Probe_command="/export/app/bin/probe \
         -x Child_mon_level=0 -y Network_resource_used=hhead \
         -x Failover_enabled=true -x Stop_signal=9
    

  6. 讓包含網路資源的資源群組上線運作。


    # scswitch -Z -g sa_rg
    

  7. app_rg 資源群組上線運作。


    # scswitch -Z -g app_rg