MC/ServiceGuardクラスタシステムのコマンドを利用し、パッケージを登録し、正しく登録されているか確認します。
コマンドの詳細は、MC/ServiceGuardのマニュアルを参照してください。
手順
パッケージを登録し、確認する手順を説明します。
1)スクリプトファイルの格納
パッケージ構成ファイルを運用系または待機系のどちらかのノードに格納し、パッケージ制御スクリプトおよびパッケージ監視スクリプトを運用系および待機系のすべてのノードに格納します。
パッケージ制御スクリプトは、パッケージ構成ファイルに記載した場所に、パッケージ監視スクリプトは、パッケージ制御スクリプトに記載した場所に格納します。以下に例を示します。
1:1運用待機の場合
パッケージ構成ファイル:
運用系“hp01”“/etc/cmcluster/omgr/omgr.conf”
パッケージ制御スクリプト:
運用系“hp01”“/etc/cmcluster/omgr/omgr.sh”
待機系“hp02”“/etc/cmcluster/omgr/omgr.sh”
パッケージ監視スクリプト:
運用系“hp01”“/etc/cmcluster/omgr/omgr.fmonitor”
待機系“hp02”“/etc/cmcluster/omgr/omgr.fmonitor”
N:1運用待機の場合(3個の運用系がある場合)
パッケージ構成ファイル:
運用系“hp01”“/etc/cmcluster/omgr/omgr1.conf”
運用系“hp02”“/etc/cmcluster/omgr/omgr2.conf”
運用系“hp03”“/etc/cmcluster/omgr/omgr3.conf”
パッケージ制御スクリプト:
運用系“hp01”“/etc/cmcluster/omgr/omgr1.sh”
運用系“hp02”“/etc/cmcluster/omgr/omgr2.sh”
運用系“hp03”“/etc/cmcluster/omgr/omgr3.sh”
待機系“hpsub”“/etc/cmcluster/omgr/omgr1.sh”
待機系“hpsub”“/etc/cmcluster/omgr/omgr2.sh”
待機系“hpsub”“/etc/cmcluster/omgr/omgr3.sh”
パッケージ監視スクリプト:
運用系“hp01”“/etc/cmcluster/omgr/omgr1.fmonitor”
運用系“hp02”“/etc/cmcluster/omgr/omgr2.fmonitor”
運用系“hp03”“/etc/cmcluster/omgr/omgr3.fmonitor”
待機系“hpsub”“/etc/cmcluster/omgr/omgr1.fmonitor”
待機系“hpsub”“/etc/cmcluster/omgr/omgr2.fmonitor”
待機系“hpsub”“/etc/cmcluster/omgr/omgr3.fmonitor”
2ノード相互待機の場合
パッケージ構成ファイル:
運用系“hp01”“/etc/cmcluster/omgr/omgr1.conf”
運用系“hp02”“/etc/cmcluster/omgr/omgr2.conf”
パッケージ制御スクリプト:
運用系“hp01”“/etc/cmcluster/omgr/omgr1.sh”
運用系“hp02”“/etc/cmcluster/omgr/omgr2.sh”
待機系“hp02”“/etc/cmcluster/omgr/omgr1.sh”
待機系“hp01”“/etc/cmcluster/omgr/omgr2.sh”
パッケージ監視スクリプト:
運用系“hp01”“/etc/cmcluster/omgr/omgr1.fmonitor”
運用系“hp02”“/etc/cmcluster/omgr/omgr2.fmonitor”
待機系“hp02”“/etc/cmcluster/omgr/omgr1.fmonitor”
待機系“hp01”“/etc/cmcluster/omgr/omgr2.fmonitor”
2)パッケージ構成ファイルの検証
パッケージ構成ファイルを格納したノードで、MC/ServiceGuardの“cmcheckconf”コマンドを使用して、パッケージ構成ファイルが正しいかどうかを検証します。
# cmcheckconf -P /etc/cmcluster/omgr/omgr.conf
3)パッケージ構成ファイルの登録
パッケージ構成ファイルを格納したノードで、MC/ServiceGuardの“cmapplyconf”コマンドを使用して、パッケージ構成ファイルを登録します。
# cmapplyconf -v -P /etc/cmcluster/omgr/omgr.conf
“Modify the package configuration ([y]/n)?”のメッセージが出力されたら、“y”を入力します。
これでパッケージの登録は完了です。
4) 登録した情報を確認する
以下のコマンドで、パッケージ構成ファイルの情報が正しく登録されているかを確認します。
# cmviewconf
表示される情報の“Package information:”以降で、パッケージ名、パッケージ制御スクリプト、パッケージ監視スクリプト、運用系のノード、および待機系のノードが正しく登録されているか確認してください。
1:1運用待機の場合の表示例を示します。
Package information: package ID 56321: package name: omgr (中略) package run script: /etc/cmcluster/omgr/omgr.sh package run timeout: (No Timeout) package halt script: /etc/cmcluster/omgr/omgr.sh package halt timeout: (No Timeout) package primary node: hp01 package alternate node: hp02
以下のコマンドで、ノードの稼働状況を確認します。
# cmviewcl
“NODE”の“STATUS”および“STATE”が“up”、“running”に、なっていることを確認してください。
1:1運用待機の場合の表示例を示します
CLUSTER STATUS cluster1 up NODE STATUS STATE hp01 up running hp02 up running PACKAGE STATUS STATE PKG_SWITCH NODE omgr down halted disabled unowned
以下のコマンドで、ノードのスイッチ状況を確認します。
# cmviewcl -v -p omgr
“Node_Switching_Parameters”の“SWITCHING”が“enabled”に、なっていることを確認してください。
1:1運用待機の場合の表示例を示します
PACKAGE STATUS STATE PKG_SWITCH NODE omgr down halted disabled unowned (中略) Node_Switching_Parameters: NODE_TYPE STATUS SWITCHING NAME Primary up enabled hp01 Alternate up enabled hp02
2)から4)の作業をN:1運用待機の場合はN回、2ノード相互待機の場合は2回、パッケージ構成ファイルを格納したノードで検証します。