さて,
スプリットブレインって?
Pacemakerを設定する上で欠かせないのがスプリットブレイン対策です。スプリットブレインとはインターコネクト
通常はあるサーバ
こういった状態を避けるためにインターコネクト用LANは冗長化することが望ましいのですが,
STONITH
STONITHはスプリットブレイン対策として最も有効な機能のひとつで,
この機能を使うには,
# crm ra list stonith
なお上記コマンドで表示されるプラグインは,
では実際に設定してみましょう。クラスタ制御機能
ネットワーク構成はSTONITH専用にインターコネクト用LANとは別のインターフェースを用意し,
表1 ネットワーク設定
IPMIボード IPアドレス | IPMIボード ユーザID | IPMIボード パスワード | |
---|---|---|---|
pm01 | 192. | ipmiuser1 | ipmipass1 |
pm02 | 192. | ipmiuser2 | ipmipass2 |
まず,
(各サーバで実行) # yum -y install OpenIPMI-tools
第2回のリソース制御機能
(各サーバで実行) # /etc/init.d/heartbeat stop
(各サーバで実行) # rm -f /var/lib/heartbeat/crm/* # /etc/init.d/heartbeat start
空っぽの状態でPacemakerが起動し,
# crm_mon -A ============ 省略 ============ Online: [ pm01 pm02 ] Node Attributes: * Node pm02: + pm01-eth1 : up + pm01-eth2 : up * Node pm01: + pm02-eth1 : up + pm02-eth2 : up
では設定していきます。設定には通常のリソース設定と同様にcrmコマンドを使用します。crmコマンドって何?
# crm configure crm(live)configure#
まずはクラスタ全体の設定です。上記プロンプトで以下の設定を入力します。
- ※
- 見やすいように"\"を使って改行しています。
property $id="cib-bootstrap-options" \ no-quorum-policy="ignore" \ stonith-enabled="true" \ startup-fencing="false" rsc_defaults resource-stickiness="INFINITY" \ migration-threshold="1"
stonith-enabled="true" で,
次にプラグインの設定です。今回はIPMIなので,
# crm ra info stonith:external/ipmi IPMI STONITH external device (stonith:external/ipmi) ipmitool based power management. Apparently, the power off method of ipmitool is intercepted by ACPI which then makes a regular shutdown. If case of a split brain on a two-node it may happen that no node survives. For two-node clusters use only the reset method. Parameters (* denotes required, [] the default): hostname (string): Hostname The name of the host to be managed by this STONITH device. ipaddr (string): IP Address The IP address of the STONITH device. userid (string): Login The username used for logging in to the STONITH device. passwd (string): Password The password used for logging in to the STONITH device. interface (string, [lan]): IPMI interface IPMI interface to use, such as "lan" or "lanplus". stonith-timeout (time, [60s]): How long to wait for the STONITH action to complete. Overrides the stonith-timeout cluster property priority (integer, [0]): The priority of the stonith resource. The lower the number, the higher the priority. Operations' defaults (advisory minimum): start timeout=60 stop timeout=15 status timeout=60 monitor_0 interval=3600 timeout=60
7つのパラメータがあるようです。