Sun Cluster 3.1 データサービス開発ガイド

標準的な Sun Cluster 管理コマンドを使って GDS ベースのサービスを作成

この節では、これらのパラメータが実際に GDS に入力されるまでの手順を示します。GDS の使用や管理は、scrgadmscswitch など、すでにある Sun Cluster 管理コマンドを通して行われます。

起動スクリプトに適切な機能が含まれている場合は、この節で述べる低位レベルの管理コマンドを入力する必要はありません。ただし、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
    
標準的な Sun Cluster 管理コマンドを使って GDS ベースのスケーラブルサービスを作成する方法

  1. リソースタイプ SUNW.gds を登録します。


    # scrgadm -a -t SUNW.gds
    
  2. SharedAddress リソースのリソースグループを作成します。


    # scrgadm -a -g sa_rg
    

  3. SharedAddress リソースを sa_rg に作成します。


    # 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