为了在部署生产系统之前testing集群configuration的各个方面,我在Centos 7主机上设置了三个Centos 7 KVM虚拟机。
节点被称为clua,club和cluc。 configuration的资源很less:
我一直在testing各种故障情况。 引起问题的原因是我通过三个节点中的两个节点上的下行接口使节点彼此失去联系。
在这里的testing我有iflu编辑clua和cluc的接口,离开俱乐部独自一人。 我已经证实,我不能在这个状态下的节点之间ping通。
在俱乐部,它或多或less是我所期望的:
root@itkclub ~ # pcs status Cluster name: tclu Stack: corosync Current DC: club (version 1.1.15-11.el7_3.4-e174ec8) - partition WITHOUT quorum Last updated: Thu Apr 6 16:23:28 2017 Last change: Thu Apr 6 16:18:33 2017 by root via cibadmin on clua 3 nodes and 12 resources configured Node clua: UNCLEAN (offline) Node cluc: UNCLEAN (offline) Online: [ club ] Full list of resources: Clone Set: dlm-clone [dlm] dlm (ocf::pacemaker:controld): Started clua (UNCLEAN) dlm (ocf::pacemaker:controld): Started cluc (UNCLEAN) Started: [ club ] Clone Set: clvmd-clone [clvmd] clvmd (ocf::heartbeat:clvm): Started clua (UNCLEAN) clvmd (ocf::heartbeat:clvm): Started cluc (UNCLEAN) Started: [ club ] Clone Set: varopt_fs-clone [varopt_fs] varopt_fs (ocf::heartbeat:Filesystem): Started clua (UNCLEAN) varopt_fs (ocf::heartbeat:Filesystem): Started cluc (UNCLEAN) Started: [ club ] Clone Set: virsh-fencing-clone [virsh-fencing] virsh-fencing (stonith:fence_virsh): Started clua (UNCLEAN) virsh-fencing (stonith:fence_virsh): Started cluc (UNCLEAN) Started: [ club ] Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled
但是,在其他两个节点(我在ifdown编辑接口的节点上),似乎没有发现任何错误:
root@itkcluc ~ # pcs status Cluster name: tclu Stack: corosync Current DC: club (version 1.1.15-11.el7_3.4-e174ec8) - partition with quorum Last updated: Thu Apr 6 16:26:01 2017 Last change: Thu Apr 6 16:18:33 2017 by root via cibadmin on clua 3 nodes and 12 resources configured Online: [ clua club cluc ] Full list of resources: Clone Set: dlm-clone [dlm] Started: [ clua club cluc ] Clone Set: clvmd-clone [clvmd] Started: [ clua club cluc ] Clone Set: varopt_fs-clone [varopt_fs] Started: [ clua club cluc ] Clone Set: virsh-fencing-clone [virsh-fencing] Started: [ clua club cluc ] Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled root@itkcluc ~ # ping club PING club (192.168.1.12) 56(84) bytes of data. ^C --- club ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 2999ms root@itkcluc ~ # ping clua PING clua (192.168.1.2) 56(84) bytes of data. ^C --- clua ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 2999ms
为什么起搏器在clua和cluc没有检测到它不能和其他任何节点通话?
一旦进入这样的状态,什么是正确的恢复程序?
其余节点都没有法定人数,因此,不能采取STONITH行动,因此没有集群行动被认为是“安全”的。
你把集群no-quorum-policy属性设置为什么? 它freeze吗? 您不能使用stop ,这是默认值,因为没有仲裁的节点将无法停止其资源,因为GFS2需要quorum来卸载或以其他方式访问其数据。
另外,在你的例子中, club是DC(指定控制器)。 它跟踪群集的资源。 其他节点必须达到法定人数才能选出新的区议会。
在三节点集群中,两个节点的NIC在同一时间发生故障的可能性极小。 然而,如果您仍然担心什么原因,您可以添加更多的节点到集群中,只作为法定节点(使用-inf:位置约束来保持资源-inf: ),直到风险变得令人满意为止。
为了摆脱这一点,我只是简单地重置所有三个框“手动”: echo b > /proc/sysrq-trigger