Sun Cluster 資料服務開發者指南 (適用於 Solaris 作業系統)

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

本小節說明如何將引數輸入至 GDS。您可使用現有 Sun Cluster 管理指令,如 scrgadm 和 scswitch,維護和管理 GDS。

如果程序檔提供足夠的功能性,則您無需使用本小節中所示的低階管理指令。然而,如果您需要更好地控制基於 GDS 的資源,則可以使用低階管理指令。這些指令由程序檔執行。

Procedure如何使用 Sun Cluster 管理指令建立使用 GDS 的高度可用服務

步驟
  1. 成為超級使用者,或者假定一個對等身份。

  2. 註冊 SUNW.gds 資源類型。


    # scrgadm -a -t SUNW.gds
    
  3. 建立包含 LogicalHostname 資源與容錯移轉服務本身的資源群組。


    # scrgadm -a -g haapp_rg
    
  4. 為 LogicalHostname 資源建立資源。


    # scrgadm -a -L -g haapp_rs -l hhead
    
  5. 建立故障轉移服務本身的資源。


    # scrgadm -a -j haapp_rs -g haapp_rg -t SUNW.gds \
             -y Scalable=false -y Start_timeout=120 \
             -y Stop_timeout=120 -x Probe_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
    
  6. 讓 haapp_rg 資源群組上線運作。


    # scswitch -Z -g haapp_rg
    

Procedure如何使用 Sun Cluster 管理指令建立使用 GDS 的可延伸服務

步驟
  1. 成為超級使用者,或者假定一個對等身份。

  2. 註冊 SUNW.gds 資源類型。


    # scrgadm -a -t SUNW.gds
    
  3. 為 SharedAddress 資源建立資源群組。


    # scrgadm -a -g sa_rg
    
  4. 在 sa_rg 上建立 SharedAddress 資源。


    # scrgadm -a -S -g sa_rg -l hhead
    
  5. 建立可延伸服務的資源群組。


    # scrgadm -a -g app_rg -y Maximum_primaries=2 \
          -y Desired_primaries=2 -y RG_dependencies=sa_rg
    
  6. 為可延伸服務建立資源。


    # 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 Port_list="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
    
  7. 讓包含網路資源的資源群組上線運作。


     # scswitch -Z -g sa_rg
    
  8. 讓 app_rg 資源群組上線運作。


    # scswitch -Z -g app_rg