本節描述如何輸入 GDS 的參數。可使用現有的 Sun Cluster 管理指令 (如 scrgadm 與 scswitch) 來使用並管理 GDS。
如果程序檔提供了足夠的功能性,則無需輸入本節顯示的較低層級管理指令。不過,如果您需要更精細地控制基於 GDS 的資源,則可以輸入較低層級的管理指令。這些指令由程序檔執行。
成為超級使用者,或者假定一個對等身份。
註冊 SUNW.gds 資源類型
# scrgadm -a -t SUNW.gds |
建立包含 LogicalHostname 資源與防故障備用服務本身的資源群組。
# scrgadm -a -g haapp_rg |
建立 LogicalHostname 資源的資源。
# scrgadm -a -L -g haapp_rs -l hhead |
建立故障轉移服務本身的資源。
# 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 |
讓 haapp_rg 資源群組上線運作。
# scswitch -Z -g haapp_rg |
成為超級使用者,或者假定一個對等身份。
註冊 SUNW.gds 資源類型。
# scrgadm -a -t SUNW.gds |
建立 SharedAddress 資源的資源群組。
# scrgadm -a -g sa_rg |
在 sa_rg 建立 SharedAddress 資源。
# scrgadm -a -S -g sa_rg -l hhead |
建立可延伸服務的資源群組。
# scrgadm -a -g app_rg -y Maximum_primaries=2 \ -y Desired_primaries=2 -y RG_dependencies=sa_rg |
建立可延伸服務本身的資源群組。
# 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 |
讓包含網路資源的資源群組上線運作。
# scswitch -Z -g sa_rg |
讓 app_rg 資源群組上線運作。
# scswitch -Z -g app_rg |