我正在遵循http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_from_Scratch/_verify_corosync_installation.html文档,以在AWS中设置2节点群集。 两个节点安装了起搏器,FW规则已启用。 当我在两个节点上运行pcs status命令时,都会收到另一个节点为UNCLEAN(脱机)的消息。
我设置的两个节点是ha1p和ha2p。
输出在ha1p上
[root@ha1 log]# pcs status Cluster name: mycluster WARNING: no stonith devices and stonith-enabled is not false Last updated: Wed Dec 24 21:30:44 2014 Last change: Wed Dec 24 21:27:44 2014 Stack: cman Current DC: ha1p - partition with quorum Version: 1.1.11-97629de 2 Nodes configured 0 Resources configured Node ha2p: UNCLEAN (offline) Online: [ ha1p ] Full list of resources:
输出到ha2p
[root@ha2 log]# pcs status Cluster name: mycluster WARNING: no stonith devices and stonith-enabled is not false Last updated: Wed Dec 24 21:30:44 2014 Last change: Wed Dec 24 21:27:44 2014 Stack: cman Current DC: ha2p - partition with quorum Version: 1.1.11-97629de 2 Nodes configured 0 Resources configured Node ha1p: UNCLEAN (offline) Online: [ ha2p ] Full list of resources:
/etc/cluster/cluster.conf的内容如下:
[root @ ha1 log]#cat /etc/cluster/cluster.conf
<cluster config_version="9" name="mycluster"> <fence_daemon/> <clusternodes> <clusternode name="ha1p" nodeid="1"> <fence> <method name="pcmk-method"> <device name="pcmk-redirect" port="ha1p"/> </method> </fence> </clusternode> <clusternode name="ha2p" nodeid="2"> <fence> <method name="pcmk-method"> <device name="pcmk-redirect" port="ha2p"/> </method> </fence> </clusternode> </clusternodes> <cman expected_votes="1" two_node="1"/> <fencedevices> <fencedevice agent="fence_pcmk" name="pcmk-redirect"/> </fencedevices> <rm> <failoverdomains/> <resources/> </rm> </cluster>
任何帮助将非常感激。
发生这种情况是因为你的集群没有完整的stonithconfiguration,在不洁的状态意味着集群不知道节点的状态。
也许你可以编辑/ etc / hosts文件,并删除包含127.0.0.1和:: 1(提到localhost的行)的行。 我有这个确切的问题,我尝试使用这种方法,并解决了这个问题。