Ale*_*hev 2 linux pacemaker failovercluster corosync
我想编辑我在 centos 6.5 上的集群配置的 pingd,因为地址不再有效,而且我的集群总是因为节点失败而切换到另一个节点。最好的方法是什么。我知道我绝不能打开直接在cib.xml 文件中。
[root@PBX1 mojo]# pcs config
Cluster Name: pbx
Corosync Nodes:
pbx1 pbx2
Pacemaker Nodes:
pbx1 pbx2
Resources:
Master: master_drbd
Meta Attrs: master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true
Resource: drbd_drbd0 (class=ocf provider=linbit type=drbd)
Attributes: drbd_resource=drbd0
Operations: monitor interval=10s (drbd_drbd0-monitor-interval-10s)
Clone: Connectivity
Resource: p_ping (class=ocf provider=pacemaker type=ping)
Attributes: host_list="10.66.4.4 10.66.4.5 10.66.4.11 10.66.4.252 10.66.4.253 10.66.4.254" multiplier=1000 dampen=5s
Operations: monitor interval=1s (p_ping-monitor-interval-1s)
Group: PBX_IP
Resource: ClusPBXIP (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=10.66.6.200 nic=bond0.2 cidr_netmask=24
Operations: monitor interval=30s (ClusPBXIP-monitor-interval-30s)
Resource: ClusNetIP (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=10.66.5.203 nic=bond0.3 cidr_netmask=24
Operations: monitor interval=30s (ClusNetIP-monitor-interval-30s)
Resource: ClusPBXIP-R (class=ocf provider=heartbeat type=Route)
Run Code Online (Sandbox Code Playgroud)
我想用另一个 IP 更改主机列表。有什么想法是最好和最安全的方法吗?我是对的,我必须在 cib.xml 中更改而不是在任何其他地方?10倍
你说你不想cib.xml直接编辑是绝对正确的。
由于您使用的pcs是管理集群配置,因此您应该这样做:
将当前的 cib 转储到文件中:
# pcs cluster cib cib-to-fix.txt
Run Code Online (Sandbox Code Playgroud)
在您喜欢的任何编辑器中打开文件并对host_list参数进行适当的更改:
# vi ./cib-to-fix.txt
Run Code Online (Sandbox Code Playgroud)
一旦您对更改感到满意,请验证它们并将它们推回到集群中:
# pcs cluster verify cib-to-fix.txt
# pcs cluster cib-push cib-to-fix.txt
Run Code Online (Sandbox Code Playgroud)
如果您在运行验证时遇到任何错误,那么您在 cib 中引入了语法错误,并且应该在推送之前修复并重新验证。
希望有帮助!