<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:等线;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:等线;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:宋体;}
span.EmailStyle18
{mso-style-type:personal-compose;
font-family:等线;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:等线;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Our system manages the database (one master and multiple slave). We use one VIP for multiple Slave resources firstly.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><img width="583" height="148" style="width:6.0729in;height:1.5416in" id="图片_x0020_2" src="cid:image002.png@01D3ACB5.53E7BAF0" alt="cid:image002.png@01D3ACB5.53E7BAF0"></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I use the following command to add the VIP<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US"> pcs resource group add pgsql-slave-group pgsql-slave-ip1 pgsql-slave-ip2<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US"> pcs constraint colocation add pgsql-slave-group with slave pgsql-ha INFINITY<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But now the two VIPs are the same nodes:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US">Master/Slave Set: pgsql-ha [pgsqld]<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US"> Masters: [ node1 ]<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US"> Slaves: [ node2 node3 ]<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US">pgsql-master-ip (ocf::heartbeat:IPaddr2): Started node1<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US">Resource Group: pgsql-slave-group<o:p></o:p></span></i></p>
<p class="MsoNormal"><b><i><span lang="EN-US"> pgsql-slave-ip1 (ocf::heartbeat:IPaddr2): Started node2<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><b><i><span lang="EN-US"> pgsql-slave-ip2 (ocf::heartbeat:IPaddr2): Started node2<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Could anyone tell how to configure to make each slave node has a VIP?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>