PC stonithが機能しない

PC stonithが機能しない

ルートがパスワードなしでログインできる2つの仮想centos7ノードがあります。

これでstonithを設定しましたが、サービスが開始されず、フェンシングも発生しません。この機能が初めてです。誰でも問題を解決するのに役立ちます〜

[root@node1 cluster]# pcs stonith create nub1 fence_virt pcmk_host_list="node1"
[root@node1 cluster]# pcs stonith create nub2 fence_virt pcmk_host_list="node2"
[root@node1 cluster]# pcs stonith show
 nub1   (stonith:fence_virt):   Stopped
 nub2   (stonith:fence_virt):   Stopped
[root@node1 cluster]#
[root@node1 cluster]#
[root@node1 cluster]#
[root@node1 cluster]#
[root@node1 cluster]# pcs status
Cluster name: mycluster
Stack: corosync
Current DC: node2 (version 1.1.15-11.el7_3.5-e174ec8) - partition with quorum
Last updated: Tue Jul 25 07:03:37 2017          Last change: Tue Jul 25 07:02:00 2017 by root via cibadmin on node1

2 nodes and 3 resources configured

Online: [ node1 node2 ]

Full list of resources:

 ClusterIP      (ocf::heartbeat:IPaddr2):       Started node1
 nub1   (stonith:fence_virt):   Stopped
 nub2   (stonith:fence_virt):   Stopped

Failed Actions:
* nub1_start_0 on node1 'unknown error' (1): call=56, status=Error, exitreason='none',
    last-rc-change='Tue Jul 25 07:01:34 2017', queued=0ms, exec=7006ms
* nub2_start_0 on node1 'unknown error' (1): call=58, status=Error, exitreason='none',
    last-rc-change='Tue Jul 25 07:01:42 2017', queued=0ms, exec=7009ms
* nub1_start_0 on node2 'unknown error' (1): call=54, status=Error, exitreason='none',
    last-rc-change='Tue Jul 25 07:01:26 2017', queued=0ms, exec=7010ms
* nub2_start_0 on node2 'unknown error' (1): call=60, status=Error, exitreason='none',
    last-rc-change='Tue Jul 25 07:01:34 2017', queued=0ms, exec=7013ms


Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled





[root@node1 cluster]# pcs stonith fence node2
Error: unable to fence 'node2'
Command failed: No route to host

[root@node1 cluster]# pcs stonith fence nub2
Error: unable to fence 'nub2'
Command failed: No such device

[root@node1 cluster]# ping node2
PING node2 (192.168.100.102) 56(84) bytes of data.
64 bytes from node2 (192.168.100.102): icmp_seq=1 ttl=64 time=0.247 ms
64 bytes from node2 (192.168.100.102): icmp_seq=2 ttl=64 time=0.304 ms
^C
--- node2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.247/0.275/0.304/0.032 ms

ベストアンサー1

フェンスエージェントに必要な情報を確認してください。# pcs resource describe fence_virt

システムログが表示されない場合は、port=STONITHデバイス設定にこのパラメータを追加する必要があるようです。ハイパーバイザーの観点から見ると、これはシステム名でなければなりません。

そうでない場合は、# grep fence_virt /var/log/messages正しい方向を教えてください。

また、これらのデバイスが正しいノードで実行され続けるように位置制約を追加する必要があります。 nub1を分離するために使用されるデバイスはnub1で実行されてはならず、nub2を分離するために使用されるデバイスはnub2で実行されてはいけません。

おすすめ記事