Pacemaker 日常运维处理

##查看节点状态

 ~]# pcs status nodes
Pacemaker Nodes:
Online: node01 node02 node03
Standby:
Maintenance:
Offline:
Pacemaker Remote Nodes:
Online:
Standby:
Maintenance:
Offline:

# 验证corosync是否正常

# corosync-cfgtool -s

Printing ring status.
Local node ID 3
RING ID 0
id = 192.168.9.100
status = ring 0 active with no faults

###查看查看corosync状态

]# pcs status corosync
Membership information

----------------------
    Nodeid      Votes Name
         3          1 node01 (local)
         1          1 node02
         2          1 node03

#查看状态

[root@node01 ~]# pcs status

Cluster name: openstackcluster
Stack: corosync
Current DC: node03 (version 1.1.19-8.el7_6.4-c3c624ea3d) - partition with quorum
Last updated: Wed Jul 14 13:19:12 2021
Last change: Wed Jul 14 12:45:56 2021 by root via cibadmin on node02

3 nodes configured
4 resources configured
Online: [ node01 node02 node03 ]
Full list of resources:
VirtualIP (ocf::heartbeat:IPaddr2):   Started node01
Clone Set: lb-haproxy-clone [lb-haproxy]
     Started: [ node01 node02 node03 ]

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

[root@node01 ~]#

##查看监控

###crm_mon

Stack: corosync
Current DC: node03 (version 1.1.19-8.el7_6.4-c3c624ea3d) - partition with quorum
Last updated: Wed Jul 14 13:22:36 2021
Last change: Wed Jul 14 12:45:56 2021 by root via cibadmin on node02

3 nodes configured
4 resources configured
Online: [ node01 node02 node03 ]

Active resources:
VirtualIP (ocf::heartbeat:IPaddr2): Started node01
Clone Set: lb-haproxy-clone [lb-haproxy]
     Started: [ node01 node02 node03 ]

##执行VIP故障迁移,vip 在node01 节点,切换到其他节点可以执行

[root@node01 ~]# pcs cluster stop node01
node01: Stopping Cluster (pacemaker)...
node01: Stopping Cluster (corosync)...

[root@node01 ~]#

##在节点node02 执行

[root@node02 ~]# pcs status nodes
Pacemaker Nodes:
Online: node02 node03
Standby:
Maintenance:
Offline: node01
Pacemaker Remote Nodes:
Online:
Standby:
Maintenance:
Offline:

##发现节点已经迁移到 node02 节点上了

[root@node02 ~]# ip -4 a |grep 192.168.3.105
    inet 192.168.3.105/24 brd 192.168.3.255 scope global secondary eno1
[root@node02 ~]#

##启动node01 节点,vip 不漂移

]# pcs cluster start node01
node01: Starting Cluster (corosync)...
node01: Starting Cluster (pacemaker)...

##查看标准资源

]# pcs resource standards
lsb
ocf
service
systemd

##查看提供者

[root@node02 ~]# pcs resource providers
heartbeat
neutron
openstack
pacemaker
rabbitmq

##确认配置是否有问题

]# crm_verify -L -V

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

石兴稳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值