Linux高可用之Corosync+Pacemaker详解(3)

查看
crm(live)configure# show
node marvin \
    attributes standby=off
node sherry
primitive webip IPaddr \
    params ip=192.168.1.199
primitive webserver lsb:nginx
colocation webserver_and_webip inf: webserver webip
property cib-bootstrap-options: \
    have-watchdog=false \
    dc-version=1.1.14-8.el6-70404b0 \
    cluster-infrastructure="classic openais (with plugin)" \
    expected-quorum-votes=2 \
    stonith-enabled=false

具体查看:
crm(live)configure# show xml
 <rsc_colocation score="INFINITY" rsc="webserver" with-rsc="webip"/>  #webserver跟着webip

顺序约束:
crm(live)configure# order webip-before-webserver mandatory: webip webserver  #依次顺序
crm(live)configure# verify
crm(live)configure# commit
 
crm(live)configure# status
order webip-before-webserver Mandatory: webip webserver
 
crm(live)configure# show xml
<rsc_order kind="Mandatory" first="webip" then="webserver"/>

位置约束
crm(live)configure# location webip_on_marvin webip 200: marvin
crm(live)configure# verify
crm(live)configure# commit

查看:
crm(live)# status
Last updated: Wed Jun  1 21:11:58 2016      Last change: Wed Jun  1 21:11:32 2016 by root via cibadmin on sherry
Stack: classic openais (with plugin)
Current DC: marvin (version 1.1.14-8.el6-70404b0) - partition with quorum
2 nodes and 2 resources configured, 2 expected votes
 
Online: [ marvin sherry ]
 
Full list of resources:
 
 webip (ocf::heartbeat:IPaddr):    Started marvin
 webserver (lsb:nginx):    Started marvin

over

Ansible+Corosync+Pacemaker+NFS实现http高可用 

基于Corosync+Pacemaker+DRBD+LNMP实现Web服务器高可用集群   

搭建基于Corosync+DRBD的高可用MySQL集群

分别基于NFS服务和DRBD服务利用Corosync配置高可用集群

Linux 高可用(HA)集群之Corosync详解

pacemaker + Corosync 搭建高可用集群

Corosync+pacemaker+RA实现MySQL高可用

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/4f796ab667f90182b458f48de4978eaf.html