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
ベストアンサー1
リソースのインデントを判断すると、webfsリソースは実際にはmywebグループのメンバーではありません。を使用してこれを確認できますpcs status groups
。次のコマンドを使用して、mywebリソースグループにwebfsリソースを追加できます。pcs resource group add myweb webfs
PS:これは明らかにWebサーバーリソースグループであるため、リソースがこのリソースグループに追加される順序に注意する必要があります。実際に正しい順序は次のとおりです。
- ネットワークファイルシステム
- 私のウェブサーバー
- ネットワークIP