10月19日 Cluster-glue 1.0.8
10月23日 LCMC 1.0.2
10月24日 Ubuntu 10.04
10月28日 DRBD 8.3.12
リリース情報では、それぞれのリリースノートを簡単にご紹介します。
知恵袋は、Pacemaker 1.0.11 で Master/Slaveリソースを使用する場合の注意点および
遷移グラフを使用した解析方法をご紹介します。
(1) リリース情報
Clustre-glueは、lrmdやSTONITH、その他各種ライブラリを含むコンポーネントです。
The highlights:
新しい STONITH プラグイン(libvirt, vcenter, hetzner)が追加されました。
- new external/libvirt stonith plugin (thanks to Holger Teutsch)
- new external/vcenter stonith plugin (thanks to Nhan Ngo Dinh)
- new external/hetzner stonith plugin (thanks to RaSca)
sbd(storage-based death) が複数デバイスにも対応しました。
- support for multiple devices in sbd
lrmd(local resource management datemon)がCIB(Cluster Information Base)からだけではなく、
ローカルの設定ファイルからもパラメータを取得することができるようになりました。
- lrmd can read parameters from local files, not only from CIB
(important for configurations with sensitive data)
重複するログの出力を制御することができるようになりました。
- log spamming control
(allows controling number of similar messages logged)
今回のリリースはバグフィックスがメインなので大きな機能追加はありません。
ちなみにロゴはむりやりピンクになってます。
The most important changes:
Mavenのpom.xmlを追加しました。
* add maven pom.xml file
CentOS 5でDRBDをインストールする際の問題を解決しました。
* fix installation of DRBD on centos5
サードパーティのライブラリで発生する警告を抑止しました。
* @SuppressWarnings in the 3rd party libs
ディレクトリ構造を変更しました。
* change directory structure to the latest standard
仮想環境用のオプションを追加しました。
* add options in VM wizard for XEN
brctlコマンドの検索パスを追加しました。
* search for brctl in /usr/sbin /sbin and /usr/local/sbin dirs
旧パッケージ(DRBD-MC)で使用していた名称をLCMCに置き換えました。
* change some old names to LCMC
Java 7でコンパイルしました。
* make it compile with Java 7
左クリックでポップアップが起動しないようにしました。
* don't let the left click to show a popup
DRBD 関連の修正
* fix the "after" DRBD option in DRBD < 8.4
* use units for all DRBD numeric fields
アイコンを変更しました。
* change application icon
startupスクリプトを追加しました。
* add LCMC startup script
Ubuntu 10.04向けに下記のパッケージがアップデートされました(参考情報)。
どのパッケージも現行の最新版ですね。
ところで、Ubuntu 11.10向けは一体…?
This update includes:
» Corosync 1.4.2
» Heartbeat 3.0.5
» cluster-glue 1.0.8
» resource-agents 3.9.2
» Pacemaker 1.1.6
今回のリリースはバグフィックスがメインなので、大きな機能追加はありませんでした。
ただし、PacemakerからDRBDを制御する際に利用する drbd RAに修正が入っているため、この点は別途ご紹介したいと思います。
8.3.12 (api:88/proto:86-96)
--------
DRBD 8.3.7以前のバージョンとの互換性に関する修正
* Fixed a rare compatibility issue with DRBD's older than 8.3.7
when negotiating the bio_size
pause/unpauseが並行して実行された場合に発生する競合条件での不具合を修正
* Fixed a rare race condition where an empty resync could stall with
if pause/unpause events happen in parallel
再接続処理を高速化
* Made the re-establishing of connections quicker, if it got a broken pipe
once. Previously there was a bug in the code caused it to waste the first
successful established connection after a broken pipe event.
DRBDの複数リソースをPacemakerのgroupで管理する場合の不具合修正(後述)
* crm-fence-peer.sh: Can now deal with multiple DRBD instances being in
a master/slave group
故障デバイスを強制的に切り離すための--forceオプションを追加。
disk-timeoutオプションでタイムアウトも設定できるようになりました。
* Allow detach from frozen backing devices with the new --force option;
configurable timeout for backing devices by the new disk-timeout option
「DRBDの複数リソースをPacemakerのgroupで管理する場合の不具合修正」について
DRBDに複数のリソースを設定する場合、drbd.confに複数のresourceセクションを作成します。
resource r0 { device minor 0; meta-disk internal; disk /dev/cciss/c0d1p1; on node01{ address 192.168.200.101:7790; } on node02{ address 192.168.200.102:7790; } } resource r1 { device minor 1; meta-disk internal; disk /dev/cciss/c0d1p2; on node01{ address 192.168.200.101:7791; } on node02{ address 192.168.200.102:7791; } }
さて、いきなりちょっと話がかわりますが、handlersセクションとdiskセクションの設定について。
DRBDの同期ネットワークが切断された場合、セカンダリノードを「Outdated」状態、
つまり、プライマリノードと同期がとれていない状態とみなす必要があります。
DRBDに同梱されている crm-fence-peer.sh というシェルスクリプトを使用すると
同期ネットワーク切断時にセカンダリノードを「Outdated」とマーキングし、再同期が完了するまでは
セカンダリノードがプライマリ状態へプロモートすることを抑止することができます。
内部ではPacemakerの配置スコアを「-INFINITY」へ変更することによって、プロモート動作を抑止しています。
スコア値の変更はPacemakerのインターコネクト経由で実行されるため、crm-fence-peer.sh を使用する場合は
DRBDの同期ネットワークと、Pacemakerのインターコネクト用ネットワークは、別系統にしなければなりません。
設定例
handersセクションとdiskセクションに以下の行を追加して、設定を反映させてください。
drbd.confの変更を反映するためには、「# drbdadm adjust all」コマンドを実行します。
設定例(drbd.conf 一部抜粋)
handlers {
fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
...
}
disk {
fencing resource-only;
}
※ 詳細は「The DRBD User’s Guide 8.3.2. Resource-level fencing using the Cluster Information Base (CIB)」を参照
リソース数が1つの場合は、上記の設定で問題ないのですが
リソース数が2つ以上の場合、各リソースのresourceセクションにhandlersセクションを設定する必要があります。
この場合、もともとのhandlersセクションの設定ではなく、resourceセクションの設定が優先して使用されます。
また、crm-fence-peer.sh および crm-unfence-peer.sh には、–id-prefixを指定します。
--id-prefix=drbd-fence-by-handler-<リソース名>
設定例(drbd.conf 一部抜粋)
handlers {
fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
...
}
disk {
on-io-error detach;
fencing resource-only;
}
resource r0 {
...
handlers {
fence-peer "/usr/lib/drbd/crm-fence-peer.sh --id-prefix=drbd-fence-by-handler-r0";
after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh --id-prefix=drbd-fence-by-handler-r0";
}
...
}
resource r1 {
...
handlers {
fence-peer "/usr/lib/drbd/crm-fence-peer.sh --id-prefix=drbd-fence-by-handler-r1";
after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh --id-prefix=drbd-fence-by-handler-r1";
}
...
}
なんでこんなめんどくさいことになっていたかというと、まあぶっちゃけ、DRBDに同梱されたdrbd RAが
複数リソースのhandlers設定に対応してなかったっていう話でして。
DRBD 8.3.12のdrbd RAは複数リソースのhandlers設定にも対応しています。
DRBD 8.3.11以前のバージョンでこの構成を使用する場合は、上記の例を参考にresourceセクションの
入れ子としてhandlersセクションを設定してください。