一、提前准备好corosync起搏器集群的前提条件
集群提前准备-->:HA-web
上面的->:Corosyncpacemaker使用crmsh构建高可用性集群
第二,提前准备电脑
这里有一个错误,提醒没有集群环境变量。但是这里的环境变量必须由cman软件呈现,所以暂时忽略。
三。采用corosync起搏器电脑的高可用性网络
1.检查适用于PC的资源代理类型
2.查询ocf资源代理类别的子类别
3.查询可以由代理代表的资源。
[root@node1 ~]# pcs resource agents [root@node1 ~]# pcs resource agents lsb [root@node1 ~]# pcs resource agents ocf:heartbeat4.查询资源代理的详细信息
5.定义iphttpd资源(收到好的文档后,httpd会显示网页,禁止启动运行)
[root@node1 ~]# pcs resource create webip ocf:heartbeat:IPaddr params ip=192.168.0.17 op monitor interval=20s timeout=40s [root@node1 ~]# pcs resource create webserver lsb:httpd op monitor interval=20s timeout=40s6.查询资源的运行状态。
[root@node1 ~]# pcs status Cluster name: Last updated: Tue Nov 22 13:07:16 2016Last change: Tue Nov 22 13:06:45 2016 by root via cibadmin on node1 Stack: classic openais (with plugin) Current DC: node1 (version 1.1.14-8.el6_8.2-70404b0) - partition with quorum 2 nodes and 2 resources configured, 2 expected votes Online: [ node1 node2 ] Full list of resources: webip(ocf::heartbeat:IPaddr):Started node1 webserver(lsb:httpd):Started node2 PCSD Status: Error: Unable to read /etc/cluster/cluster.conf: No such file or directory7.定义排序捆绑包。
[root@node1 ~]# pcs constraint colocation add webserver with webip [root@node1 ~]# pcs status Cluster name: Last updated: Tue Nov 22 13:13:18 2016Last change: Tue Nov 22 13:12:28 2016 by root via cibadmin on node1 Stack: classic openais (with plugin) Current DC: node1 (version 1.1.14-8.el6_8.2-70404b0) - partition with quorum 2 nodes and 2 resources configured, 2 expected votes Online: [ node1 node2 ] Full list of resources: webip(ocf::heartbeat:IPaddr):Started node2 webserver(lsb:httpd):Started node2 Failed Actions: * webserver_start_0 on node1 'unknown error' (1): call=20, status=complete, exitreason='none', last-rc-change='Tue Nov 22 13:12:29 2016', queued=0Ms, exec=508米s测试
8.定义订单和控制
9.定义零件束。
[root@node1 ~]# pcs constraint location webip prefers node2=100欢迎分享,转载请注明来源:内存溢出
评论列表(0条)