<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=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal>I am trying to create failover resource that would start if another resource is stopped and stop when the resource is started back.<o:p></o:p></p><p class=MsoNormal>It is 4 node cluster (with qdevice) where nodes are virtual machines and two of them are hosted in a datacenter and the other 2 VMs in another datacenter.<o:p></o:p></p><p class=MsoNormal>Names of the nodes are:<o:p></o:p></p><p class=MsoNormal>nas-sync-test1<o:p></o:p></p><p class=MsoNormal>intranet-test1<o:p></o:p></p><p class=MsoNormal>nas-sync-test2<o:p></o:p></p><p class=MsoNormal>intranet-test2<o:p></o:p></p><p class=MsoNormal>The nodes ending with 1 are hosted in same datacenter and ending in 2 are in the other datacenter.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>nas-sync-test* nodes are running NFS servers and exports:<o:p></o:p></p><p class=MsoNormal>nfs_server_1, nfs_export_1 (running on nas-sync-test1)<o:p></o:p></p><p class=MsoNormal>nfs_server_2, nfs_export_2 (running on nas-sync-test2)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>intranet-test1 is running NFS mount data_1 (mounting the nfs_export_1), intranet-test2 is running data_2 (mounting nfs_export_2).<o:p></o:p></p><p class=MsoNormal>I created data_1_failover which is mounting the nfs_export_1 too and would like to be running on intranet-test2 ONLY if data_2 is down. So the idea is it mounts nfs_export_1 on intranet-test2 only when the local mount data_2 is stopped (note the nfs_server_1 runs on one datacenter and intranet-test2 in the another DC)<o:p></o:p></p><p class=MsoNormal>Also created data_2_failover with the same purpose as data_1_failover.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I would like to ask how to set the failover mounts automatically start when ordinary mounts stop?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Current configuration of the constraints:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>tag all_mounts data_1 data_2 data_1_failover data_2_failover<o:p></o:p></p><p class=MsoNormal>tag sync_1 nfs_server_1 nfs_export_1<o:p></o:p></p><p class=MsoNormal>tag sync_2 nfs_server_2 nfs_export_2<o:p></o:p></p><p class=MsoNormal>location deny_data_1 data_1 -inf: intranet-test2<o:p></o:p></p><p class=MsoNormal>location deny_data_2 data_2 -inf: intranet-test1<o:p></o:p></p><p class=MsoNormal>location deny_failover_1 data_1_failover -inf: intranet-test1<o:p></o:p></p><p class=MsoNormal>location deny_failover_2 data_2_failover -inf: intranet-test2<o:p></o:p></p><p class=MsoNormal>location deny_sync_1 sync_1 \<o:p></o:p></p><p class=MsoNormal>        rule -inf: #uname ne nas-sync-test1<o:p></o:p></p><p class=MsoNormal>location deny_sync_2 sync_2 \<o:p></o:p></p><p class=MsoNormal>        rule -inf: #uname ne nas-sync-test2<o:p></o:p></p><p class=MsoNormal>location mount_on_intranet all_mounts \<o:p></o:p></p><p class=MsoNormal>        rule -inf: #uname eq nas-sync-test1 or #uname eq nas-sync-test2<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>colocation nfs_1 inf: nfs_export_1 nfs_server_1<o:p></o:p></p><p class=MsoNormal>colocation nfs_2 inf: nfs_export_2 nfs_server_2<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>order nfs_server_export_1 Mandatory: nfs_server_1 nfs_export_1<o:p></o:p></p><p class=MsoNormal>order nfs_server_export_2 Mandatory: nfs_server_2 nfs_export_2<o:p></o:p></p><p class=MsoNormal>order mount_1 Mandatory: nfs_export_1 data_1<o:p></o:p></p><p class=MsoNormal>order mount_1_failover Mandatory: nfs_export_1 data_1_failover<o:p></o:p></p><p class=MsoNormal>order mount_2 Mandatory: nfs_export_2 data_2<o:p></o:p></p><p class=MsoNormal>order mount_2_failover Mandatory: nfs_export_2 data_2_failover<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I tried adding following colocation:<o:p></o:p></p><p class=MsoNormal>   colocation failover_1 -inf: data_2_failover data_1<o:p></o:p></p><p class=MsoNormal>and it is stopping data_2_failover when data_1 is started, also it starts data_2_failover when data_1 is stopped – exactly as needed!<o:p></o:p></p><p class=MsoNormal>Full List of Resources:<o:p></o:p></p><p class=MsoNormal>  * admin-ip    (ocf::heartbeat:IPaddr2):        Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * stonith-sbd (stonith:external/sbd):  Started intranet-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_export_1        (ocf::heartbeat:exportfs):       Started nas-sync-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_server_1        (systemd:nfs-server):    Started nas-sync-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_export_2        (ocf::heartbeat:exportfs):       Started nas-sync-test2<o:p></o:p></p><p class=MsoNormal>  * nfs_server_2        (systemd:nfs-server):    Started nas-sync-test2<o:p></o:p></p><p class=MsoNormal>  * data_1_failover     (ocf::heartbeat:Filesystem):     Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * data_2_failover     (ocf::heartbeat:Filesystem):     Stopped<o:p></o:p></p><p class=MsoNormal>  * data_2      (ocf::heartbeat:Filesystem):     Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * data_1      (ocf::heartbeat:Filesystem):     Started intranet-test1<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Full List of Resources:<o:p></o:p></p><p class=MsoNormal>  * admin-ip    (ocf::heartbeat:IPaddr2):        Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * stonith-sbd (stonith:external/sbd):  Started intranet-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_export_1        (ocf::heartbeat:exportfs):       Started nas-sync-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_server_1        (systemd:nfs-server):    Started nas-sync-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_export_2        (ocf::heartbeat:exportfs):       Started nas-sync-test2<o:p></o:p></p><p class=MsoNormal>  * nfs_server_2        (systemd:nfs-server):    Started nas-sync-test2<o:p></o:p></p><p class=MsoNormal>  * data_1_failover     (ocf::heartbeat:Filesystem):     Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * data_2_failover     (ocf::heartbeat:Filesystem):     Started intranet-test1<o:p></o:p></p><p class=MsoNormal>  * data_2      (ocf::heartbeat:Filesystem):     Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * data_1      (ocf::heartbeat:Filesystem):     Stopped (disabled)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>But it does not start data_2_failover when nfs_export_1 is stopped which stops data_1:<o:p></o:p></p><p class=MsoNormal>Full List of Resources:<o:p></o:p></p><p class=MsoNormal>  * admin-ip    (ocf::heartbeat:IPaddr2):        Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * stonith-sbd (stonith:external/sbd):  Started intranet-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_export_1        (ocf::heartbeat:exportfs):       Stopped (disabled)<o:p></o:p></p><p class=MsoNormal>  * nfs_server_1        (systemd:nfs-server):    Started nas-sync-test1<o:p></o:p></p><p class=MsoNormal>  * nfs_export_2        (ocf::heartbeat:exportfs):       Started nas-sync-test2<o:p></o:p></p><p class=MsoNormal>  * nfs_server_2        (systemd:nfs-server):    Started nas-sync-test2<o:p></o:p></p><p class=MsoNormal>  * data_1_failover     (ocf::heartbeat:Filesystem):     Stopped<o:p></o:p></p><p class=MsoNormal>  * data_2_failover     (ocf::heartbeat:Filesystem):     Stopped<o:p></o:p></p><p class=MsoNormal>  * data_2      (ocf::heartbeat:Filesystem):     Started intranet-test2<o:p></o:p></p><p class=MsoNormal>  * data_1      (ocf::heartbeat:Filesystem):     Stopped<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any help and ideas will be appreciated.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div>
<br><table id="pharmya_gdpr_container" border="0" cellspacing="0" cellpadding="0" width="100%">

        <tr>

                <td width="600">

<table width="100%" cellpadding="0" cellspacing="0" border="0">

    <tr>

      <td style="border-top: 2px solid #8C8C8C; text-align:justify;">

          <img src="cid:51380616a7fd58bf23e4a38a6e33101b" 

                        class="replace_cid" alt="GDPR Logo" width="126" 

                        height="50" align="left" style="margin-right:5px;"/>

                        

                        <span style="font-size:10pt; 

font-family: Segoe, 'Segoe UI', 'DejaVu Sans', 'Trebuchet MS', Verdana, sans-serif;" 

class="gdpr_text">

This message has been sent as a part of discussion between PHARMYA

and the addressee whose name is specified above. Should you receive

this message by mistake, we would be most grateful if you informed

us that the message has been sent to you. In this case, we also ask

that you delete this message from your mailbox, and do not forward

it or any part of it to anyone else.<br>

Thank you for your cooperation and understanding.

                        </span>

      </td>

    </tr>

</table>

        </td>

        <td></td>

</table>

<br></body></html>