Re: [DRBD-user] Understanding "classic" 3 node set up.

2018-02-07 Thread Paul O'Rorke

Oh my

2 weeks of missing that typo and frustration.  Thank you both Yannis and 
Peter.  Peter, I thought you were pointing out the answer to my question 
- which file is it failing to find.  I normally copy the .res file to 
ensure they are always identical, and it was correct on nodes 1 and 2


I really appreciate the help guys, it all makes sense now.  I was 
worried that I had a serious misunderstanding in what I was doing.


   root@trk-kvm-01:~# cat /proc/drbd
   version: 8.4.5 (api:1/proto:86-101)
   srcversion: 4B3E2E2CD48CAE5280B5205

   [...]
   12: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-
    ns:4764 nr:0 dw:10719324 dr:21194772 al:1676 bm:0 lo:0 pe:0
   ua:0 ap:0 ep:1 wo:f oos:0
   [...]
   120: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent A
   r-
    ns:19642880 nr:0 dw:0 dr:19645043 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
   ep:1 wo:f oos:32782648
    [==>.] sync'ed: 37.5% (32012/51196)M
    finish: 0:12:39 speed: 43,136 (38,896) K/sec

and

   root@trk-kvm-03:/media/scratch# drbd-overview
   120:convirt-U/0  SyncTarget Secondary/Primary Inconsistent/UpToDate
    [===>] sync'ed: 44.8% (28312/51196)M

Makes me very happy!

*Paul O'Rorke*
*Tracker Software Products (Canada) Limited *
www.tracker-software.com 
Tel: +1 (250) 324 1621
Fax: +1 (250) 324 1623



Support:
http://www.tracker-software.com/support
Download latest Releases
http://www.tracker-software.com/downloads/




On 2018-02-07 04:22 AM, Yannis Milios wrote:
Did you fixed the typo that Peter mentioned on his last post ? That 
should be "internal" and not "inetrnal". Then must copy the resource 
file on all 3 nodes.
>>  meta-disk   inetrnal; 
After fixing that you should be able to create the metadata and 
initialize  the stacked device by:


On trk-kvm-01 (assuming that this is the primary node):
drbdadm create-md --stacked convirt-U

On trk-kvm-03:
drbdadm create-md convirt-U    #this will create the required metadata 
on the underlying device (i.e /dev/trk-kvm-03-vg/convirt). No need to 
transfer metadata manually from trk-kvm-01)


On trk-kvm-01:
drbdadm --stacked adjust convirt-U

On trk-kvm-03:
drbdadm adjust convirt-U

On trk-kvm-01:
drbdadm --stacked -- --overwrite-data-of-peer primary convirt-U
cat /proc/drbd



Y



___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Understanding "classic" 3 node set up.

2018-02-07 Thread Yannis Milios
Did you fixed the typo that Peter mentioned on his last post ? That should
be "internal" and not "inetrnal". Then must copy the resource file on all 3
nodes.


> >>  meta-disk   inetrnal;
>
>

After fixing that you should be able to create the metadata and initialize
the stacked device by:

On trk-kvm-01 (assuming that this is the primary node):
drbdadm create-md --stacked convirt-U

On trk-kvm-03:
drbdadm create-md convirt-U#this will create the required metadata on
the underlying device (i.e /dev/trk-kvm-03-vg/convirt). No need to transfer
metadata manually from trk-kvm-01)

On trk-kvm-01:
drbdadm --stacked adjust convirt-U

On trk-kvm-03:
drbdadm adjust convirt-U

On trk-kvm-01:
drbdadm --stacked -- --overwrite-data-of-peer primary convirt-U
cat /proc/drbd



Y
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Understanding "classic" 3 node set up.

2018-02-07 Thread Paul O'Rorke

Thanks Peter,

as I understand it when I created the original drbd device(s) on my 
local nodes this metadata was automatically created and placed at the 
end of the underlying LVM volume.  Clearly this is not happening when 
creating the drbd device on the third node.  So being stacked I believe 
I need the meta data from the lower resource and then create-md will add 
the required metadata for the stacked resource.


How do I get that original metadata on my underlying volume so that is 
can do so?  I tried taking a snapshot of the underlying LVM volume on 
trk-kvm-01 (lower resource primary) and used dd to copy that to the 
underlying volume on trk-kvm-03 (third node upper resource) but I get 
the same error.


So what do I need to do to get this metadata there so I can create this 
drbd device on the third node?


*Paul O'Rorke*



On 2018-02-05 11:45 PM, Peter Schwindt wrote:

Paul,

On 2018-02-05 19:27, Paul O'Rorke wrote:


 root@trk-kvm-03:~# drbdadm create-md convirt-U
 open(inetrnal) failed: No such file or directory
 open(inetrnal) failed: No such file or directory



[...]


What file is it looking for that it fails to find?

The resource is defined with this:


[...]

     on trk-kvm-03 {
     device  /dev/drbd120;
     disk    /dev/trk-kvm-03-vg/convirt;
     address 192.168.0.201:7899;
     meta-disk   inetrnal;

   

Best,
Peter



___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Understanding "classic" 3 node set up.

2018-02-07 Thread Paul O'Rorke

Thanks Peter,

as I understand it when I created the original drbd device(s) on my 
local nodes this metadata was automatically created and placed at the 
end of the underlying LVM volume.  Clearly this is not happening when 
creating the drbd device on the third node.  So being stacked I believe 
I need the meta data from the lower resource and then


*Paul O'Rorke*


On 2018-02-05 11:45 PM, Peter Schwindt wrote:

Paul,

On 2018-02-05 19:27, Paul O'Rorke wrote:


 root@trk-kvm-03:~# drbdadm create-md convirt-U
 open(inetrnal) failed: No such file or directory
 open(inetrnal) failed: No such file or directory



[...]


What file is it looking for that it fails to find?

The resource is defined with this:


[...]

     on trk-kvm-03 {
     device  /dev/drbd120;
     disk    /dev/trk-kvm-03-vg/convirt;
     address 192.168.0.201:7899;
     meta-disk   inetrnal;

   

Best,
Peter



___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Understanding "classic" 3 node set up.

2018-02-05 Thread Peter Schwindt
Paul,

On 2018-02-05 19:27, Paul O'Rorke wrote:

> root@trk-kvm-03:~# drbdadm create-md convirt-U
> open(inetrnal) failed: No such file or directory
> open(inetrnal) failed: No such file or directory
   

[...]

> What file is it looking for that it fails to find?
>
> The resource is defined with this:
> 
[...]
>
>     on trk-kvm-03 {
>     device  /dev/drbd120;
>     disk    /dev/trk-kvm-03-vg/convirt;
>     address 192.168.0.201:7899;
>     meta-disk   inetrnal;
  

Best,
Peter

-- 
: Peter Schwindt
: LINBIT | Keeping the Digital World Running
: DRBD — Heartbeat — Corosync — Pacemaker

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.



smime.p7s
Description: S/MIME Cryptographic Signature
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Understanding "classic" 3 node set up.

2018-02-05 Thread Paul O'Rorke
Moving ahead with the assumptions before and I have defined the stacked 
resource on node "alice" (trk-kvm-01), created the drbd block device:


   root@trk-kvm-01:~# drbdadm create-md --stacked convirt-U
   md_offset 53685411840
   al_offset 53685379072
   bm_offset 53683740672

   Found some data

 ==> This might destroy existing data! <==

   Do you want to proceed?
   [need to type 'yes' to confirm] yes

   initializing activity log
   NOT initializing bitmap
   Writing meta data...
   New drbd meta data block successfully created.
   success

It comes up OK:

   root@trk-kvm-01:~# drbdadm up --stacked convirt-U

   root@trk-kvm-01:~# drbd-overview
   ...
 12:convirt/0    Connected  Primary/Secondary
   UpToDate/UpToDate _convirt   vda virtio
   ...
   120:convirt-U/0 ^^12 Connected  Secondary/Secondary
   Inconsistent/Diskless

I made it the primary

   root@trk-kvm-01:~# drbdadm primary --force --stacked convirt-U

It seems OK on this node:

   root@trk-kvm-01:~# drbd-overview
   ...
 12:convirt/0    Connected Primary/Secondary  
   UpToDate/UpToDate _convirt vda virtio
   ...
   120:convirt-U/0 ^^12 Connected Primary/Secondary  
   UpToDate/Diskless

However when I try to create the drbd block device on the third node I 
get the following:


   root@trk-kvm-03:~# drbdadm create-md convirt-U
   open(inetrnal) failed: No such file or directory
   open(inetrnal) failed: No such file or directory
   Command 'drbdmeta 120 v08 inetrnal flex-external create-md'
   terminated with exit code 20

What file is it looking for that it fails to find?

The resource is defined with this:

   resource convirt {
    net {
    protocol C;
    }

    device    /dev/drbd12;
    meta-disk internal;

    on trk-kvm-01 {
    address   10.10.0.85:7789;
    disk  /dev/trk-kvm-01-vg/convirt;
    }
    on trk-kvm-02 {
    address   10.10.0.86:7789;
    disk  /dev/trk-kvm-02-vg/convirt;
    }
   }

   resource convirt-U {
    net {
    protocol A;
    }

    stacked-on-top-of convirt {
    device /dev/drbd120;
    address 192.168.0.101:7789;
    }

    on trk-kvm-03 {
    device  /dev/drbd120;
    disk /dev/trk-kvm-03-vg/convirt;
    address 192.168.0.201:7899;
    meta-disk   inetrnal;
    }
   }

The underlying LVM volume does exist:

   root@trk-kvm-03:~# lvs
  LV    VG    Attr   LSize Pool Origin
   Data%  Meta%  Move Log Cpy%Sync Convert
  ...
  convirt   trk-kvm-03-vg -wi-a- 50.00g
  ...

I tried removing the volume with lvremove:

   root@trk-kvm-03:~# lvremove /dev/trk-kvm-03-vg/convirt
   Do you really want to remove and DISCARD active logical volume
   convirt? [y/n]: y
  Logical volume "convirt" successfully removed

and creating it again with lvcreate:

   root@trk-kvm-03:~# lvcreate -L50G -n convirt trk-kvm-03-vg
  Logical volume "convirt" created.

it looks OK

   --- Logical volume ---
  LV Path    /dev/trk-kvm-03-vg/convirt
  LV Name    convirt
  VG Name    trk-kvm-03-vg
  LV UUID QT7YNm-zlYi-7S0d-lF26-EEi2-7g69-0iU3aC
  LV Write Access    read/write
  LV Creation host, time trk-kvm-03, 2018-02-05 09:03:56 -0800
  LV Status  available
  # open 0
  LV Size    50.00 GiB
  Current LE 12800
  Segments   1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device   252:13

Why can I not make the DRBD block device?  I see that some required file 
is missing but I don't understand what:


   root@trk-kvm-03:~# drbd-overview
   120:convirt-U/0  . . .

and

   root@trk-kvm-03:~# cat /proc/drbd
   version: 8.4.5 (api:1/proto:86-101)
   srcversion: 4B3E2E2CD48CAE5280B5205

   120: cs:Unconfigured

Something simple I have missed/misunderstood?

*Paul O'Rorke*
*Tracker Software Products (Canada) Limited *
www.tracker-software.com 
Tel: +1 (250) 324 1621
Fax: +1 (250) 324 1623



Support:
http://www.tracker-software.com/support
Download latest Releases
http://www.tracker-software.com/downloads/




On 2018-02-02 11:31 AM, Paul O'Rorke wrote:


Hi

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.


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 

[DRBD-user] Understanding "classic" 3 node set up.

2018-02-05 Thread Paul O'Rorke

Hi

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.


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.


Referring to this 
http://docs.linbit.com/docs/users-guide-8.4/#s-three-nodes 6.18.2. 
Configuring a stacked resource


I don't understand where to set up the interface for the stacked resource:

|stacked-on-top-of r0 { device /dev/drbd10; address 192.168.42.1:7788; }|

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?


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?


Sorry if this is explained somewhere and I missed it.

regards

--

*Paul O'Rorke*
*Tracker Software Products (Canada) Limited *
www.tracker-software.com 
Tel: +1 (250) 324 1621
Fax: +1 (250) 324 1623



Support:
http://www.tracker-software.com/support
Download latest Releases
http://www.tracker-software.com/downloads/




___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user