Sun Java System Messaging Server 6.3 管理ガイド

Procedure2 ノード HA 非対称 Messaging Server を設定する — 例

この例では、物理ホスト名 daisy.red.siroe.com および lavender.red.siroe.com と論理ホスト名 budgie が設定された 2 ノードクラスタを仮定します。

daisy.red.siroe.com では、バイナリが /opt/SUNWmsgsr に、設定データが /var/opt/SUNWmsgsr にインストールされています。

論理ホスト名 budgie には、論理 IP アドレスが割り当てられています。たとえば、/etc/hosts ファイルは、次のようになっています。


192.18.75.157 budgie.red.siroe.com budgie
  1. Messaging Server Sun Cluster エージェント (SUNWscims) を両方のノードにインストールします。

  2. ファイルシステムを作成します。

    この例のファイルシステム /var/opt/SUNWmsgsr は、共有ディスクにマウントされています。このファイルシステムは、クラスタファイルシステムでもローカルファイルシステム (フェイルオーバーファイルシステム) でもかまいません。

  3. 第一のノード (daisy) を設定します。

    1. 第一のノードに必要なリソースタイプを追加します。

      使用する予定のリソースタイプを認識するように Sun Cluster を設定します。Messaging Server および HAStoragePlus リソースを登録するには、次のコマンドを使用します。


      # scrgadm -a -t SUNW.HAStoragePlus
      # scrgadm -a -t SUNW.ims 
    2. Messaging Server インスタンスに対して MS_RG_DAISY という名前のリソースグループを作成します。


      # scrgadm -a -g MS_RG_daisy -h daisy,lavender
    3. meadow という名前の論理ホスト名リソースを作成してリソースグループに追加し、オンラインにします。


      # scrgadm -a -L -g MS_RG_DAISY -l meadow
      # scrgadm -c -j meadow -y R_description="LogicalHostname resource for meadow"
      # scswitch -Z -g MS_RG_DAISY
    4. 先に作成したファイルシステムで ms-hasp-daisy という名前の HAStoragePlus リソースを作成します。


      # scrgadm -a -j ms-hasp-daisy -g MS_RG_DAISY -t SUNW.HAStoragePlus -x 
      FileSystemMountPoints ="/var/opt/SUNWmsgsr" -x 
      AffinityOn=TRUE
    5. HAStoragePlus リソースを有効にします。


      # scswitch -e -j ms-hasp-daisy
  4. 第一のノードに Messaging Server をインストールし、設定します (「1.3 Messaging Server の初期実行時設定を作成する」を参照)。

    初期実行時設定で、完全修飾ホスト名が要求されます。論理ホスト名 meadow.red.siroe.com を入力します。設定ディレクトリの指定も要求されます。/var/opt/SUNWmsgsr と入力します。

  5. 第一のノードで ha_ip_config スクリプトを実行し、論理 IP アドレスを指定します。

    第一のノードのみで実行し、第ニのノードでは実行しません。ha_ip_config スクリプトは、sbin ディレクトリの下のインストールディレクトリにあります。次に例を示します。


    # /opt/SUNWmsgsr/sbin/ha_ip_config
    
    Please specify the IP address assigned to the HA logical host name. 
    Use dotted decimal form, a.b.c.d
    
    Logical IP address: 192.18.75.155 
    # This value is the logical IP address of the logical hostname. Refer 
    # to the /etc/hosts file.
    Please specify the path to the top level directory in which iMS is
    installed.
    
    iMS server root: /opt/SUNWmsgsr
    
    . . . 
    
    Updating the file /opt/SUNWmsgsr/config/dispatcher.cnf
    Updating the file /opt/SUNWmsgsr/config/job_controller.cnf
    Setting the service.listenaddr configutil parameter
    Setting the local.snmp.listenaddr configutil parameter
    Setting the service.http.smtphost configutil parameter
    Setting the local.watcher.enable configutil parameter
    Setting the local.autorestart configutil parameter
    Setting the metermaid.config.bindaddr configutil parameters
    Setting the metermaid.config.serveraddr configutil parameters
    Setting the local.ens.port parameter
    Configuration successfully updated
  6. imta.cnf ファイルを修正して、物理ホスト名 (daisy) の出現箇所すべてを HA 論理ホスト名 (meadow) に置き換えます。

  7. リソースグループを第ニのノード (lavender) にフェイルオーバーします。

    フェイルオーバー後、第ニのノード (lavender) を設定します。


    # scswitch -z -g MS_RG_LAVENDER -h daisy
  8. 第ニのノード (lavender) で、Messaging Server をインストールし、useconfig ユーティリティーを実行します。「3.3.3 useconfig ユーティリティーの使用」を参照してください。

    初期実行時設定プログラム (configure) を実行する必要はありません。

    次の例で、/var/opt/SUNWmsgsr は共有設定ディレクトリです。


    # useconfig /var/opt/SUNWmsgsr/setup/configure_20061201124116
    cp /var/opt/SUNWmsgsr/setup/configure_20061201124116/Devsetup.properties
    /opt/SUNWmsgsr/lib/config-templates/Devsetup.properties
    /usr/sbin/groupadd mail
    /usr/sbin/useradd -g mail -d / mailsrv
    /usr/sbin/usermod -G mail mailsrv
    sed -e "s/local.serveruid/mailsrv/" -e "s/local.serveruid/mail/" -e "s:<msg·RootPath>:/opt/SUNWmsgsr:" 
    /opt/SUNWmsgsr/lib/config-templates/devtypes.txt.template > 
    /opt/SUNWmsgsr/lib/config-templates/devtypes.txt
    sed -e "s/local.serveruid/mailsrv/" -e "s/local.serveruid/mail/" -e 
    "s:<msg·RootPath>:/opt/SUNWmsgsr:" 
    /opt//SUNWmsgsr/lib/config-templates/config.ins.template > 
    /opt/SUNWmsgsr/lib/config-templates/config.ins
    /opt/SUNWmsgsr/lib/devinstall -l sepadmsvr:pkgcfg:config -v -m -i 
    /opt/SUNWmsgsr/lib/config-templates/config.ins 
    /opt/SUNWmsgsr/lib/config-templates 
    /opt/SUNWmsgsr/lib/jars /opt/SUNWmsgsr/lib
    devinstall returned 0
    crle -c /var/ld/ld.config -s
     /usr/lib/secure:/opt/SUNWmsgsr/lib:/opt/SUNWmsgsr/lib:/opt/SUNWmsgsr/lib 
    -s /opt/SUNWmsgsr/lib
    See /opt/SUNWmsgsr/install/useconfiglog_20061211155037 for more details
  9. HA Messaging Server リソースを作成し、有効にします。


    # scrgadm -a -j ms-rs-daisy -t SUNW.ims -g MS_RG_DAISY -x IMS_serverroot 
    =/opt/SUNWmsgsr -y Resource_dependencies=meadow,ms-hasp-daisy
    # scswitch -e -j mail-rs-daisy

    このコマンドでは、/opt/SUNWmsgsr にインストールされた Messaging Server 用に ms-rs-daisy という名前の HA Messaging Server リソースを作成します。この HA Messaging Server リソースは、HA ディスクリソース、つまり先に作成したファイルシステムと、HA 論理ホスト名 meadow に依存します。

  10. すべてが動作していることを確認します。

    Messaging Server リソースを第一のノードにフェイルオーバーします。


     # scswitch -z -g MAIL-RG -h daisy