<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Moving ahead with the assumptions before and I have defined the
      stacked resource on node "alice" (trk-kvm-01), created the drbd
      block device:</p>
    <blockquote>
      <p><tt>root@trk-kvm-01:~# drbdadm create-md --stacked convirt-U</tt><tt><br>
        </tt><tt>md_offset 53685411840</tt><tt><br>
        </tt><tt>al_offset 53685379072</tt><tt><br>
        </tt><tt>bm_offset 53683740672</tt><tt><br>
        </tt><tt><br>
        </tt><tt>Found some data</tt><tt><br>
        </tt><tt><br>
        </tt><tt> ==&gt; This might destroy existing data! &lt;==</tt><tt><br>
        </tt><tt><br>
        </tt><tt>Do you want to proceed?</tt><tt><br>
        </tt><tt>[need to type 'yes' to confirm] yes</tt><tt><br>
        </tt><tt><br>
        </tt><tt>initializing activity log</tt><tt><br>
        </tt><tt>NOT initializing bitmap</tt><tt><br>
        </tt><tt>Writing meta data...</tt><tt><br>
        </tt><tt>New drbd meta data block successfully created.</tt><tt><br>
        </tt><tt>success</tt></p>
    </blockquote>
    <p>It comes up OK:<br>
    </p>
    <blockquote>
      <p><tt>root@trk-kvm-01:~# drbdadm up --stacked convirt-U</tt></p>
    </blockquote>
    <blockquote>
      <p><tt>root@trk-kvm-01:~# drbd-overview </tt><br>
        <tt>...</tt><br>
        <tt> 12:convirt/0                Connected  Primary/Secondary  
          UpToDate/UpToDate     _convirt           vda virtio </tt><br>
        <tt>... </tt><br>
        <tt>120:convirt-U/0         ^^12 Connected  Secondary/Secondary
          Inconsistent/Diskless <br>
        </tt></p>
    </blockquote>
    <p>I made it the primary</p>
    <blockquote>
      <p><tt>root@trk-kvm-01:~# drbdadm primary --force --stacked
          convirt-U</tt></p>
    </blockquote>
    <p>It seems OK on this node:<br>
    </p>
    <blockquote>
      <p><tt>root@trk-kvm-01:~# drbd-overview</tt><tt><br>
        </tt><tt>...</tt><tt><br>
        </tt><tt> 12:convirt/0                Connected 
          Primary/Secondary   UpToDate/UpToDate     _convirt          
          vda virtio </tt><tt><br>
        </tt><tt>...</tt><tt><br>
        </tt><tt>120:convirt-U/0         ^^12 Connected 
          Primary/Secondary   UpToDate/Diskless   <br>
        </tt></p>
    </blockquote>
    <p>However when I try to create the drbd block device on the third
      node I get the following:</p>
    <blockquote>
      <p><tt>root@trk-kvm-03:~# drbdadm create-md convirt-U</tt><tt><br>
        </tt><tt>open(inetrnal) failed: No such file or directory</tt><tt><br>
        </tt><tt>open(inetrnal) failed: No such file or directory</tt><tt><br>
        </tt><tt>Command 'drbdmeta 120 v08 inetrnal flex-external
          create-md' terminated with exit code 20</tt><br>
      </p>
    </blockquote>
    <p>What file is it looking for that it fails to find?</p>
    <p>The resource is defined with this:</p>
    <blockquote>
      <p><tt>resource convirt {</tt><tt><br>
        </tt><tt>        net {</tt><tt><br>
        </tt><tt>                protocol C;</tt><tt><br>
        </tt><tt>        }</tt><tt><br>
        </tt><tt><br>
        </tt><tt>        device    /dev/drbd12;</tt><tt><br>
        </tt><tt>        meta-disk internal;</tt><tt><br>
        </tt><tt><br>
        </tt><tt>        on trk-kvm-01 {</tt><tt><br>
        </tt><tt>        address   10.10.0.85:7789;</tt><tt><br>
        </tt><tt>        disk      /dev/trk-kvm-01-vg/convirt;</tt><tt><br>
        </tt><tt>        }</tt><tt><br>
        </tt><tt>        on trk-kvm-02 {</tt><tt><br>
        </tt><tt>        address   10.10.0.86:7789;</tt><tt><br>
        </tt><tt>        disk      /dev/trk-kvm-02-vg/convirt;</tt><tt><br>
        </tt><tt>        }</tt><tt><br>
        </tt><tt>}</tt><tt><br>
        </tt><tt><br>
        </tt><tt>resource convirt-U {</tt><tt><br>
        </tt><tt>        net {</tt><tt><br>
        </tt><tt>                protocol A;</tt><tt><br>
        </tt><tt>        }</tt><tt><br>
        </tt><tt><br>
        </tt><tt>        stacked-on-top-of convirt {</tt><tt><br>
        </tt><tt>                device /dev/drbd120;</tt><tt><br>
        </tt><tt>                address 192.168.0.101:7789;</tt><tt><br>
        </tt><tt>        }</tt><tt><br>
        </tt><tt><br>
        </tt><tt>        on trk-kvm-03 {</tt><tt><br>
        </tt><tt>                device          /dev/drbd120;</tt><tt><br>
        </tt><tt>                disk           
          /dev/trk-kvm-03-vg/convirt;</tt><tt><br>
        </tt><tt>                address         192.168.0.201:7899;</tt><tt><br>
        </tt><tt>                meta-disk       inetrnal;</tt><tt><br>
        </tt><tt>        }</tt><tt><br>
        </tt><tt>}</tt><tt><br>
        </tt></p>
    </blockquote>
    <p>The underlying LVM volume does exist:</p>
    <blockquote>
      <p><tt>root@trk-kvm-03:~# lvs</tt><tt><br>
        </tt><tt>  LV                VG            Attr       LSize  
          Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert</tt><tt><br>
        </tt><tt>  ...                                             </tt><tt><br>
        </tt><tt>  convirt           trk-kvm-03-vg -wi-a----- 
          50.00g     </tt><tt><br>
        </tt><tt>  ... </tt>  <br>
      </p>
    </blockquote>
    <p>I tried removing the volume with lvremove:<br>
    </p>
    <blockquote>
      <p><tt>root@trk-kvm-03:~# lvremove /dev/trk-kvm-03-vg/convirt</tt><tt><br>
        </tt><tt>Do you really want to remove and DISCARD active logical
          volume convirt? [y/n]: y</tt><tt><br>
        </tt><tt>  Logical volume "convirt" successfully removed</tt><br>
      </p>
    </blockquote>
    <p>and creating it again with lvcreate:</p>
    <blockquote>
      <p><tt>root@trk-kvm-03:~# lvcreate -L50G -n convirt trk-kvm-03-vg
        </tt><tt><br>
        </tt><tt>  Logical volume "convirt" created.</tt><br>
      </p>
    </blockquote>
    <p>it looks OK</p>
    <blockquote>
      <p><tt>--- Logical volume ---</tt><tt><br>
        </tt><tt>  LV Path                /dev/trk-kvm-03-vg/convirt</tt><tt><br>
        </tt><tt>  LV Name                convirt</tt><tt><br>
        </tt><tt>  VG Name                trk-kvm-03-vg</tt><tt><br>
        </tt><tt>  LV UUID               
          QT7YNm-zlYi-7S0d-lF26-EEi2-7g69-0iU3aC</tt><tt><br>
        </tt><tt>  LV Write Access        read/write</tt><tt><br>
        </tt><tt>  LV Creation host, time trk-kvm-03, 2018-02-05
          09:03:56 -0800</tt><tt><br>
        </tt><tt>  LV Status              available</tt><tt><br>
        </tt><tt>  # open                 0</tt><tt><br>
        </tt><tt>  LV Size                50.00 GiB</tt><tt><br>
        </tt><tt>  Current LE             12800</tt><tt><br>
        </tt><tt>  Segments               1</tt><tt><br>
        </tt><tt>  Allocation             inherit</tt><tt><br>
        </tt><tt>  Read ahead sectors     auto</tt><tt><br>
        </tt><tt>  - currently set to     256</tt><tt><br>
        </tt><tt>  Block device           252:13</tt><tt><br>
        </tt></p>
    </blockquote>
    <p>Why can I not make the DRBD block device?  I see that some
      required file is missing but I don't understand what:<br>
    </p>
    <blockquote>
      <p><tt>root@trk-kvm-03:~# drbd-overview </tt><tt><br>
        </tt><tt>120:convirt-U/0  . . . </tt><br>
      </p>
    </blockquote>
    <p>and</p>
    <blockquote>
      <p><tt>root@trk-kvm-03:~# cat /proc/drbd </tt><tt><br>
        </tt><tt>version: 8.4.5 (api:1/proto:86-101)</tt><tt><br>
        </tt><tt>srcversion: 4B3E2E2CD48CAE5280B5205 </tt><tt><br>
        </tt><tt><br>
        </tt><tt>120: cs:Unconfigured</tt></p>
    </blockquote>
    <p>Something simple I have missed/misunderstood?<br>
    </p>
    <blockquote> </blockquote>
    <div class="moz-signature">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <title></title>
      <p><b>Paul O'Rorke</b><br>
        <b>Tracker Software Products (Canada) Limited </b><br>
        <a href="http://www.tracker-software.com/">www.tracker-software.com</a><br>
        Tel:
        +1 (250) 324 1621<br>
        Fax: +1 (250) 324 1623<br>
        <br>
        <a href="http://www.tracker-software.com/"> <img
src="https://www.tracker-software.com/fckfiles/image/images/resellers/logo/TrackerSofwareProducts_Logo_330x100.png"
            name="image.png" height="100" align="bottom" width="330"
            border="0">
        </a>
        <br>
        <br>
        Support:
        <br>
        <a href="http://www.tracker-software.com/support">http://www.tracker-software.com/support
        </a><br>
        Download latest Releases
        <br>
        <a href="http://www.tracker-software.com/downloads/">http://www.tracker-software.com/downloads/</a></p>
      <p><br>
        <br>
      </p>
      <p style="margin-bottom: 0cm; line-height: 100%"><br>
      </p>
    </div>
    <div class="moz-cite-prefix">On 2018-02-02 11:31 AM, Paul O'Rorke
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:280d1081-65eb-e31c-dc90-097cd6bc554d@tracker-software.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <p>Hi <br>
      </p>
      <p>I hope this is the right place to ask what may be a silly
        question.  I have searched the archives and still do not
        understand properly how to set up "classic 3 node" for DR.</p>
      <p>I have been using a simple HA setup for some years now for KVM
        virtual machines.  I have a DRBD resource for each VM, backed by
        LVM volumes, each using a unique IP (aliases) via CAT5 directly
        connecting dedicated NICs on each of "alice" and "bob" (I'm
        using the example from the docs here for simplicity).  I run
        half the guests on each host and manually fail over if it is
        ever needed.  This has been rock solid for me, great performance
        and has on more than one occasion saved my bacon.  I want to set
        up a classic 3 node DR with a VPN connected off site 3rd stacked
        node.<br>
      </p>
      <p>Referring to this <a moz-do-not-send="true"
          href="http://docs.linbit.com/docs/users-guide-8.4/#s-three-nodes">http://docs.linbit.com/docs/users-guide-8.4/#s-three-nodes</a>
        6.18.2. Configuring a stacked resource</p>
      <p>I don't understand where to set up the interface for the
        stacked resource:</p>
      <pre class="highlight"><code class="language-drbd" data-lang="drbd">stacked-on-top-of r0 {
    device     /dev/drbd10;
    address    192.168.42.1:7788;
  }</code></pre>
      <div class="moz-signature">
        <p>What interface gets this IP?  I am assuming it goes on the
          primary node of the lower resource.  So for the example in the
          docs, if alice is the primary I set up 192.168.42.1:7789 on
          alice and if I have to switch bob to primary I loose
          replication to charlie until such time as I either restore
          alice as the primary or can I set up 192.168.42.1:7789 on bob
          somehow and continue off site replication while alice is down?</p>
        <p>As I am reading it bob has no "knowledge" of charlie and the
          upper resource can only function while alice is primary.  Is
          that right?<br>
        </p>
        <p>Sorry if this is explained somewhere and I missed it.</p>
        <p>regards<br>
        </p>
        -- <br>
        <title></title>
        <p><b>Paul O'Rorke</b><br>
          <b>Tracker Software Products (Canada) Limited </b><br>
          <a href="http://www.tracker-software.com/"
            moz-do-not-send="true">www.tracker-software.com</a><br>
          Tel: +1 (250) 324 1621<br>
          Fax: +1 (250) 324 1623<br>
          <br>
          <a href="http://www.tracker-software.com/"
            moz-do-not-send="true"> <img
src="https://www.tracker-software.com/fckfiles/image/images/resellers/logo/TrackerSofwareProducts_Logo_330x100.png"
              name="image.png" moz-do-not-send="true" height="100"
              align="bottom" width="330" border="0"> </a> <br>
          <br>
          Support: <br>
          <a href="http://www.tracker-software.com/support"
            moz-do-not-send="true">http://www.tracker-software.com/support
          </a><br>
          Download latest Releases <br>
          <a href="http://www.tracker-software.com/downloads/"
            moz-do-not-send="true">http://www.tracker-software.com/downloads/</a></p>
        <p><br>
          <br>
        </p>
        <p style="margin-bottom: 0cm; line-height: 100%"><br>
        </p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
drbd-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a>
<a class="moz-txt-link-freetext" href="http://lists.linbit.com/mailman/listinfo/drbd-user">http://lists.linbit.com/mailman/listinfo/drbd-user</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>