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

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

在本節中,將說明如何將這些參數實際輸入至 GDS。 以現有的 Sun Cluster 管理指令 (如 scrgadm 與 scswitch) 使用與管理 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 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
    
  5. 讓 haapp_rg 資源群組上線運作。


    # scswitch -Z -g haapp_rg
    
建立使用 GDS 之可延伸服務的標準 Sun Cluster 管理指令
  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 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 
    
  6. 讓包含網路資源的資源群組上線運作。


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


    # scswitch -Z -g app_rg