ペースメーカー:嘘をつく方法

特定のタイプのリソースを予約する場合、たとえばdrbdのように、複数のクライアントが同時にリソースを使用しないことが非常に重要です。2つのシステムでdrbdをRWモードでマウントすることはできません。 同じことは、複数のサーバーに接続するディスクシステムにも当てはまります。



これにはペースメーカー自体が続きますが、リソースを転送する必要があるとペースメーカーが決定したが、シャットダウンコマンドを別のノードに与えることができない場合があります(たとえば、別のネットワーク経由でiscsiを使用する場合のネットワーク接続の喪失など) 。 これに対処するために、stonith (頭の中の他のノードを撃つ)が使用されます。 ペースメーカーでは、リソースとして設定され、多くの問題を解決できます。



初期設定は簡単です:





最初のステップでは、問題を回避するために、現在の構成をダンプします

pcs cluster cib stonith.xml
      
      







クラスターでは、stonithがアクティブであり、クォーラムが無効になっている必要があります(クラスターは2つのノードであるため) 。 これを確認してください

 #pcs -f stonith.xml property show ... no-quorum-policy: ignore stonith-enabled: true ...
      
      





そうでない場合は、

 pcs -f stonith.xml property set stonith-enabled=true pcs -f stonith.xml property set no-quorum-policy=ignore
      
      







次に、ipmi-stonithリソースを作成します(可能なstonithリソースの完全なリストはpcs stonith list



、パラメーターの完全なリストはpcs stonith describe )



によって利用可能ですpcs stonith describe )





 pcs -f stonith.xml stonith create node1.stonith fence_ipmilan ipaddr="node1.ipmi" passwd="xXx" login="xXx" action="reboot" method="cycle" pcmk_host_list="node1.eth" pcmk_host_check=static-list stonith-timeout=10s op monitor interval=10s pcs -f stonith.xml stonith create node2.stonith fence_ipmilan ipaddr="node2.ipmi" passwd="xXx" login="xXx" action="reboot" method="cycle" pcmk_host_list="node2.eth" pcmk_host_check=static-list stonith-timeout=10s op monitor interval=10s
      
      





ipaddr



pcmk_host_list



2つのパラメーターに特に注意する必要がありpcmk_host_list



最初のものはどのIPMIインターフェイスがどのアドレスにあるかを示し、2番目のものは作成されたリソースでどのノードを終了できるかを示します。



ペースメーカーの観点から見ると、ストニスは通常のリソースであるため、他のすべてのリソースと同様に移行できます。 node2の再起動を担当するプロセスがnode2にある場合、非常に不快になります。 したがって、stonithリソースが過負荷になるノードに到達することを禁止します。

 pcs -f stonith.xml constraint location node1.stonith avoids node1.eth=INFINITY pcs -f stonith.xml constraint location node2.stonith avoids node2.eth=INFINITY
      
      







セットアップが完了しました。 ペースメーカーの湾岸構成

 pcs cluster push cib stonith.xml
      
      







その後、簡単なチェック

 stonith_admin -t 20 --reboot node1.eth
      
      





すべてが正しくなったことを明確にします。



最終的な構成は次のようになります。



 # pcs status Online: [ node1.eth node2.eth ] Full list of resources: FS (ocf::heartbeat:Filesystem): Started node2.eth node1.stonith (stonith:fence_ipmilan): Started node2.eth node2.stonith (stonith:fence_ipmilan): Started node1.eth # pcs constraint location Location Constraints: Resource: node1.stonith Disabled on: node1.eth Resource: node2.stonith Disabled on: node2.eth # pcs property show no-quorum-policy: ignore stonith-enabled: true
      
      






All Articles