次の手順で、Sun Cluster HA for WebSphere MQ をフェイルオーバーデータサービスとして構成します。この手順は、Sun Cluster のインストール時にこのデータサービスパッケージをインストールしている場合を想定しています。
Sun Cluster の初回インストールの一部としては Sun Cluster HA for WebSphere MQ パッケージをインストールしていない場合、「scinstall ユーティリティーを使用して Sun Cluster HA for WebSphere MQ パッケージをインストールする」へ進みます。
SUNW.gds リソースタイプを登録します。
# scrgadm -a -t SUNW.gds |
SUNW.HAStoragePlus リソースタイプを登録します。
# scrgadm -a -t SUNW.HAStoragePlus |
フェイルオーバーリソースグループを作成します。
# scrgadm -a -g WebSphere MQ-failover-resource-group |
WebSphere MQ ディスク記憶装置に対応するリソースを作成します。
# scrgadm -a -j WebSphere MQ-has-resource \ -g WebSphere MQ-failover-resource-group \ -t SUNW.HAStoragePlus \ -x FilesystemMountPoints=WebSphere MQ- instance-mount-points |
WebSphere MQ 論理ホスト名に対応するリソースを作成します。
# scrgadm -a -L -j WebSphere MQ-lh-resource \ -g WebSphere MQ-failover-resource-group \ -l WebSphere MQ-logical-hostname |
WebSphere MQ ディスク記憶装置と 論理ホスト名のリソースが組み込まれたフェイルオーバーリソースグループを有効にします。
# scswitch -Z -g WebSphere MQ-failover-resource-group |
必要な個々の WebSphere MQ コンポーネントを作成して登録します。
Queue Manager コンポーネント (mgr) に対してこの手順を実行し、さらに使用するオプションの WebSphere MQ コンポーネントごとに、mgr を以下のどれか 1 つに置き換えて手順を繰り返します。
chi - Channel Initiator
csv - Command Server
lsr - Dedicated Listener
trm - Trigger Monitor
chi コンポーネントを使用すると、Sun Cluster で Channel Initiator を管理することができます。ただしデフォルトでは、WebSphere MQ はデフォルトのチャネル開始キュー SYSTEM.CHANNEL.INITQ を起動します。このチャネル開始キューを chi コンポーネントで管理する必要がある場合は、Queue Manager の qm.ini ファイル内の独立した行で QueueManagerStartup: および Chinit=No のコードを設定する必要があります。これにより、Queue Manager がデフォルトのチャネル開始キューを起動することを防止できます。その代わりに、これは、chi コンポーネントにより起動されるようになります。
lsr コンポーネントでは、複数のポートを使用できます。複数のポートを指定するには、/opt/SUNWscmqs/lsr/util/lsr_config 内の PORT パラメータで必要な各ポートエントリに対して、複数のポート番号を / で区切って指定する必要があります。この指定により、lsr コンポーネントは異なるポートエントリに対して複数の runmqlsr プログラムを開始します。
trm コンポーネントでは、複数のトリガーモニターを使用できます。/opt/SUNWscmqs/trm/util/trm_register の実行前に、/opt/SUNWscmqs/trm/util/trm_config 内の TRMQ パラメータを file に設定する必要があります。この指定により、trm コンポーネントは、トリガーモニターキュー名が含まれる必要がある /opt/SUNWscmqs/trm/etc/<qmgr>_trm_queues (<qmgr> は使用している Queue Manager の名前) から複数のトリガーモニターエントリを開始します。Sun Cluster HA for WebSphere MQ を実行する Sun Cluster 内の各ノードに必要なこのファイルを作成する必要があります。また、広域ファイルシステムへのシンボリックリンクとすることもできます。
# cd /opt/SUNWscmqs/mgr/util |
mgr_config ファイルを編集し、そのファイルに次のようなコメントを追加します。
# # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This file will be sourced in by mgr_register and the parameters # listed below will be used. # # These parameters can be customized in (key=value) form # # RS - name of the resource for the application # RG - name of the resource group containing RS # QMGR - name of the Queue Manager # PORT - name of the Queue Manager port number # LH - name of the LogicalHostname SC resource # HAS_RS - name of the Queue Manager HAStoragePlus SC resource # CLEANUP - Cleanup IPC entries YES or NO (Default CLEANUP=YES) # USERID - name of userid to issue strmqm/endmqm commands # (Default USERID=mqm) # # +++ Optional parameters +++ # # DB2INSTANCE - name of the DB2 Instance name # ORACLE_HOME - name of the Oracle Home Directory # ORACLE_SID - name of the Oracle SID # START_CMD - pathname and name of the renamed strmqm program # STOP_CMD - pathname and name of the renamed endmqm program # # Note 1: Optional parameters # # Null entries for optional parameters are allowed if not used. # # Note 2: XAResourceManager processing # # If DB2 will participate in global units of work then set # DB2INSTANCE= # # If Oracle will participate in global units of work then set # ORACLE_HOME= # ORACLE_SID= # # Note 3: Renamed strmqm/endmqm programs # # This is only recommended if WebSphere MQ is deployed onto # Global File Systems for qmgr/log files. You should specify # the full pathname/program, i.e. /opt/mqm/bin/<renamed_strmqm> # # Note 4: Cleanup IPC # # Under normal shutdown and startup WebSphere MQ manages it's # cleanup of IPC resources with the following fix packs. # # MQSeries v5.2 Fix Pack 07 (CSD07) or later # WebSphere MQ v5.3 Fix Pack 04 (CSD04) or later # # Please refer to APAR number IY38428. # # However, while running in a failover environment, the IPC keys # that get generated will be different between nodes. As a result # after a failover of a Queue Manager, some shared memory segments # can remain allocated on the node although not used. # # Although this does not cause WebSphere MQ a problem when starting # or stopping (with the above fix packs applied), it can deplete # the available swap space and in extreme situations a node may # run out of swap space. # # To resolve this issue, setting CLEANUP=YES will ensure that # IPC shared memory segments for WebSphere MQ are removed whenever # a Queue Manager is stopped. However IPC shared memory segments # are only removed under strict conditions, namely # # - The shared memory segment(s) are owned by # CREATOR=mqm and CGROUP=mqm # - The shared memory segment has no attached processes # - The CPID and LPID process ids are not running # - The shared memory removal is performed by userid mqm # # Setting CLEANUP=NO will not remove any shared memory segments. # # Setting CLEANUP=YES will cleanup shared memory segments under the # conditions described above. # |
WebSphere MQ Manager qmgr1 の例を示します。
RS=wmq-qmgr-res RG=wmq-rg QMGR=qmgr1 PORT=1414 LH=wmq-lh-res HAS_RS=wmq-has-res CLEANUP=YES USERID=mqm DB2INSTANCE= ORACLE_HOME= ORACLE_SID= START_CMD= STOP_CMD= |
mgr_config の編集後、リソースを登録します。
# ./mgr_register |
WebSphere MQ Manager の保護を有効にします (必要な場合)。
WebSphere MQ Manager の保護を実装すべきなのは、広域ファイルシステムに WebSphere MQ を配備した場合だけです。WebSphere MQ Manager の実装の詳細は、「構成に関する要件」、特に例 4 を参照してください。それ以外の場合は、次の手順に直接進んでください。
この手順は Sun Cluster HA for WebSphere MQ のホストとなる SunCluster 内の各ノードで繰り返す必要があります。
各 WebSphere MQ リソースを有効にします。
前の手順と同様、WebSphere MQ コンポーネントごとにこの手順を繰り返します。
# scstat |
# scswitch -e -j WebSphere MQ-resource |