本节介绍了如何将参数输入到 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 |