我正在为 HAProxy 创建一个 Fedora PCS 集群。我让它在 VMWare 上运行,并遵循本指南,并进入添加 IPAddr2 资源的步骤:http ://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_adding_a_resource.html
唯一的区别是我需要在一个 NIC/子网上我的集群心跳/通信,而我的共享资源 IP 在不同的 NIC/子网上。
我的内部通讯是Node1=192.160.0.1 and Node2=192.168.0.2,我的资源ip是10.0.0.1
在这种情况下如何使用此命令:
pcs resource create ClusterIP ocf:heartbeat:IPaddr2 \
ip=192.168.0.120 cidr_netmask=32 op monitor interval=30s
如果我如上所述添加它,我会得到:
[root@node-01 .pcs]# pcs status
Cluster name: mycluster
Last updated: Tue Oct 28 09:10:13 2014
Last change: Tue Oct 28 09:00:13 2014 via cibadmin on node-02
Stack: corosync
Current DC: node-02 (2) - partition with quorum
Version: 1.1.11-1.fc20-9d39a6b
2 Nodes configured
1 Resources configured
Online: [ node-01 node-02 ]
Full list of resources:
ClusterIP (ocf::heartbeat:IPaddr2): Stopped
Failed actions:
ClusterIP_start_0 on node-01 'unknown error' (1): call=7, status=complete, last-rc-change='Tue Oct 28 09:00:13 2014', queued=0ms, exec=27ms
ClusterIP_start_0 on node-02 'unknown error' (1): call=6, status=complete, last-rc-change='Tue Oct 28 09:00:13 2014', queued=0ms, exec=27ms