根据redhat的官方文档,资源组中的所有资源都隐含着位置和顺序约束。但是,从我在实验室设置中所做的测试中,我看不到在不同节点上启动相同资源组中的任何约束和资源。
[root@node1 conf]# pcs status
Cluster name: mycluster
Last updated: Thu Oct 26 03:49:50 2017 Last change: Wed Oct 25 11:01:51 2017 by root via crm_resource on node1
Stack: corosync
Current DC: node1 (version 1.1.13-10.el7-44eb2dd) - partition with quorum
3 nodes and 6 resources configured
Online: [ node1 node2 node3 ]
Full list of resources:
fencer_node3 (stonith:fence_xvm): Started node1
fencer_node1 (stonith:fence_xvm): Started node2
fencer_node2 (stonith:fence_xvm): Started node3
Resource Group: myweb
webip (ocf::heartbeat:IPaddr2): Started node1
mywebserver (ocf::heartbeat:apache): Started node1
webfs (ocf::heartbeat:Filesystem): Started node2
PCSD Status:
node1: Online
node3: Online
node2: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled发布于 2017-10-26 14:16:06
从资源缩进来看,资源webfs实际上不是组myweb的成员。您可以使用pcs status groups验证这一点。可以使用pcs resource group add myweb webfs将webfs资源添加到myweb资源组中。
PS:这显然是一个web服务器资源组,因此您必须注意将资源添加到该资源组的顺序,正确的顺序实际上是:
https://unix.stackexchange.com/questions/400524
复制相似问题