Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

1.3.3. Fencing

Fencing is the disconnection of a node from the cluster's shared storage. Fencing cuts off I/O from shared storage, thus ensuring data integrity. The cluster infrastructure performs fencing through the fence daemon, fenced.
CMAN がノードの1つが故障したと判定すると、CMAN はそのノードが故障したことを 他のクラスタインフラストラクチャコンポーネントに通達します。その故障の通達を受けた fenced はそのノードを フェンス(遮断)します。他のインフラストラクチャ コンポーネントはどんな行動を取るべきか判定します — 即ち、復元に必要となるすべてを実行します。 例えば、DLM と GFS はノード故障の通知を受けると、fenced が故障ノードの フェンスを完了したことを検知するまで活動を休止します。故障ノードが フェンスされたことを確認した時点で DLM と GFS はその復元を実行します。DLM は故障ノードのロックを解除し、GFS は故障ノードの ジャーナルを取り戻します。
フェンシング プログラムは、クラスタ設定ファイルからどの方法を使用すべきかを決定します。 クラスタ設定ファイル内の二つの主要素が フェンシング方法を定義します: フェンシングエージェントと フェンシングデバイスです。フェンシングプログラムはクラスタ設定ファイルに指定されているフェンシングエージェントを 呼び出します。その フェンシングエージェントは、そこで フェンシングデバイス を介してノードの フェンス を します。フェンシング が完了した時点で フェンシングプログラムはクラスタマネージャに通知を出します.
Red Hat Cluster Suite は各種の フェンシング 方法を提供します:
  • パワーフェンシング — 操作不能なノードの電源を切る為にパワーコントローラを使用する フェンシング 方法。
  • ファイバーチャンネルスイッチ フェンシング — 操作不能なノードにストレージを 接続するようなファイバーチャンネルポートを無効にする フェンシング 方法。
  • GNBD fencing — A fencing method that disables an inoperable node's access to a GNBD server.
  • 他のフェンシング — 操作不能なノードの I/O や電源を無効にする他のフェンシング 方法が数種あり、 その中には IBM Bladecenters、PAP、DRAC/MC、HP ILO、 IPMI、IBM RSA II、その他が含まれます。
図1.3「Power Fencing Example」 shows an example of power fencing. In the example, the fencing program in node A causes the power controller to power off node D. 図1.4「Fibre Channel Switch Fencing Example」 shows an example of Fibre Channel switch fencing. In the example, the fencing program in node A causes the Fibre Channel switch to disable the port for node D, disconnecting node D from storage.
Power Fencing Example

図1.3 Power Fencing Example

Fibre Channel Switch Fencing Example

図1.4 Fibre Channel Switch Fencing Example

フェンシング 方法の指定はクラスタ設定ファイルを編集して、クラスタ内の各ノード用に フェンシング方法の名前、フェンシングエージェント、及び フェンシングデバイスを割り当てることで 構成されます。
The way in which a fencing method is specified depends on if a node has either dual power supplies or multiple paths to storage. If a node has dual power supplies, then the fencing method for the node must specify at least two fencing devices — one fencing device for each power supply (refer to 図1.5「Fencing a Node with Dual Power Supplies」). Similarly, if a node has multiple paths to Fibre Channel storage, then the fencing method for the node must specify one fencing device for each path to Fibre Channel storage. For example, if a node has two paths to Fibre Channel storage, the fencing method should specify two fencing devices — one for each path to Fibre Channel storage (refer to 図1.6「Fencing a Node with Dual Fibre Channel Connections」).
Fencing a Node with Dual Power Supplies

図1.5 Fencing a Node with Dual Power Supplies

Fencing a Node with Dual Fibre Channel Connections

図1.6 Fencing a Node with Dual Fibre Channel Connections

ノードは単独フェンシング 法か、又は複数フェンシング 法で設定することができます。 ノードを単独 フェンシング 法で設定する場合は、そのノードを フェンスするには, その フェンシング 法のみが使用できます。ノードを 複数 フェンシング 法で設定すると、 フェンシング 法は、クラスタ設定ファイル内に指定してある フェンシング 法の順に従って 1つの フェンシング 法から次の フェンシング 法へと 順送り(cascaded) と なります。ノードが故障すると、そのノード用にクラスタ設定ファイル内に指定された最初の フェンシング 法でノードをフェンスします。最初の フェンシング 法が機能しない場合、そのノード用に指定してある 次の フェンシング 法が使用されます。全ての フェンシング 法が機能しない状態になると、最初の フェンシング 法に戻りそのノードがフェンスされるまで、クラスタ設定ファイル内に指定された順で フェンシング 法を繰り返します。