[ClusterLabs] How to configure to make each slave resource has one VIP

范国腾 fanguoteng at highgo.com
Fri Feb 23 02:17:40 EST 2018


Hi,

Our system manages the database (one master and multiple slave). We use one VIP for multiple Slave resources firstly.
Now I want to change the configuration that each slave resource has a separate VIP. For example, I have 3 slave nodes and my VIP group has 2 vip; The 2 vips binds to node1 and node2 now; When the node2 fails, the vip could move to the node3.

[cid:image002.png at 01D3ACB5.53E7BAF0]

I use the following command to add the VIP

      pcs resource group add pgsql-slave-group pgsql-slave-ip1 pgsql-slave-ip2
      pcs constraint colocation add pgsql-slave-group with slave pgsql-ha INFINITY

But now the two VIPs are the same nodes:

Master/Slave Set: pgsql-ha [pgsqld]
     Masters: [ node1 ]
     Slaves: [ node2 node3 ]
pgsql-master-ip        (ocf::heartbeat:IPaddr2):       Started node1
Resource Group: pgsql-slave-group
     pgsql-slave-ip1    (ocf::heartbeat:IPaddr2):       Started node2
     pgsql-slave-ip2    (ocf::heartbeat:IPaddr2):       Started node2

Could anyone tell how to configure to make each slave node has a VIP?

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/users/attachments/20180223/246a3d45/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 6570 bytes
Desc: image002.png
URL: <http://lists.clusterlabs.org/pipermail/users/attachments/20180223/246a3d45/attachment-0001.png>


More information about the Users mailing list