Re: [DRBD-user] how to restore lvm snapshot?

2020-01-29 Thread Paul O'Rorke
Well (ironically?) you have me wondering if my approach may have issues 
I simply have not encountered, possibly due to good luck, so I am 
interested in hearing from others whether I should reconsider my approach...


I received a lot of invaluable help from the list, and in particualr one 
very helpful gentleman named Simon Ironside back in 2013 when I 
initially set this up.  Thanks again Simon if you are still on this list.:



On 23/07/2013 18:11, Charles Lyons - ConnetU wrote:


If we snapshot the LV itself, presumably we'll get a copy not only of
the VM's volume block data but also of DRBD metadata on the LV (which I
understand is stored in the end/final segment(s) of the LV).


Yes, assuming you are using internal metadata. I'm doing exactly this 
too.



(1) Is there any danger of this process not giving a DRBD-consistent
snapshot? Is there anything within DRBD which needs to be flushed/synced
prior to starting the snapshot (as is the practice with SQL)?


I've found it to be 100% reliable, it worked absolutely fine when I 
really needed it.



(2) How is best to restore an image file of the LV, assuming the VM is
offline and, if necessary, the DRBD resource can be
detached/disconnected on each/both side(s)?


I treat it more or less like a new resource. I do the below, this 
works but is perhaps OTT:


# Shutdown the VM
drbdadm secondary  # on the primary node
drbdadm down     # on both nodes
# Restore the LV image to the LV on one node
drbdadm create-md  # on both nodes
drbdadm up  # on both nodes
drbdadm -- -o primary  # on the node I restored
# Start the VM

Because you have new metadata on both nodes, there will be a full 
resync doing the above.


I suppose, but have not tried and proven, that this could be 
simplified by just doing:


# Shutdown the VM
# Restore the LV image to the DRBD resource in primary role.
# Start the VM

The LV image will of course be longer than the DRBD resource but the 
extra is the metadata at the end of the volume which we're not 
interested in anyway. Because you write to the DRBD resource rather 
than the underlying LV, the sync to the secondary is already happening 
during your restore.



(3) Presumably it doesn't matter if the snapshot is taken on the primary
or secondary?


With protocol C, it doesn't matter.


Second related topic: if we've got an existing snapshot, can we use this
as the basis for creating a totally new DRBD resource... i.e. creating a
new LV of identical size, dd the image to the LV and then create a new
DRBD resource on top. Is there anything in the metadata (like global
UUIDs) which could be duplicated and confuse DRBD? If so, is there a
recommended way to "reset" the metadata prior to attaching so it will
appear as a totally new pre-seeded volume?


Yes, using the method I described above (drbdadm create-md ) 
you'll have fresh metadata on both sides. You'll be prompted before it 
overwrites the existing metadata.


HTH,
Simon 


I have not had to do more than 3 or 4 restores of production servers 
since then and in each case took the simple road:


# Shutdown the VM
# Restore the LV image to the DRBD resource in primary role. [I use DD 
for this]

# Start the VM

I have even had success restoring directly to the primary, snapshots of 
running machines.  Perhaps I have just been lucky. The restore includes 
the internal metadata as it was when the snapshot was taken and I am 
writing to the upper DRBD device and it gets replicated as I write it.  
Now I realize I don't really appreciate the potential risks in that.


Can anyone with a more in depth knowledge comment on this?

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

<http://www.tracker-software.com/>

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




On 2020-01-29 12:14 a.m., d tbsky wrote:
Paul O'Rorke <mailto:p...@tracker-software.com>>


I don't know what others do, I just do essentially what you said,
but without stopping the DRBD service.  I simply restore the
snapshot to the primary DRBD block device, not the backing device
and let DRBD do it's magic in the background.

   thanks a lot for your hint. with lvm under drbd, I think it's not 
easy to restore the snapshot directly to drbd. unless I dd the 
snapshot to drbd?  but it's not efficient. what's you method to 
restore snapshot to drbd?
___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] how to restore lvm snapshot?

2020-01-27 Thread Paul O'Rorke

Hi d tbsky,

I don't know what others do, I just do essentially what you said, but 
without stopping the DRBD service.  I simply restore the snapshot to the 
primary DRBD block device, not the backing device and let DRBD do it's 
magic in the background.


I have done this for a Windows file server as well as a variety of Linux 
servers and haven't had an issue yet.


Having said that, I think others recommend stopping DRBD and restoring 
to the backing device, then forcing a sync with


drbdadm secondary 
drbdadm connect --discard-my-data 

You will find others on here with a deeper understanding of this.  Take 
their advice over mine if in doubt, and test, test, test...


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

<http://www.tracker-software.com/>

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




On 2020-01-26 7:59 a.m., d tbsky wrote:

Hi:
 I have some windows vm running on top of drbd, and drbd on top of
lvm. I want to install dotnet 4.8 on these vm. the patch can not be
uninstalled and may destroy  the system. so I want to make snapshot of
lvm and restore the snapshot if necessary. I wonder what to do at drbd
layer when lvm snapshot got restored. I think the safe steps like
below:

1. disconnect secondary and abandon the content
2. stop primary drbd service
3. restore primary lvm snapshot
4. start primary drbd service and connect secondary to re-sync from primary

but I wonder if there are faster ways?
1. do we need to stop drbd service before restore lvm snapshot?
2. can we let drbd know we revert to some previous state and re-sync
only necessary data?
___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user
___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Adding additional 'node' to DRBD

2019-01-30 Thread Paul O'Rorke

Thanks Roland,

I appreciate the quick and candid reply.

*Paul O'Rorke*


On 2019-01-30 8:48 a.m., Roland Kammerer wrote:

On Wed, Jan 30, 2019 at 07:49:39AM -0800, Paul O'Rorke wrote:

Thanks Roland,

I am not sure if I should start a new topic for this, but now you have me
wondering

I use a classic 3 node setup, LVM backing devices, and a stacked third node
for DR using Protocol A.  I have a VPN between the main site and off-site
and the latency hovers around 10ms.

Are there compelling reasons for me to look into DRBD 9?  My current setup
is pretty solid, so far I have never needed to use the off site copies
(touch wood).  I have 12 resources (all KVM HA servers) piped through the
VPN.

When your setup is more or less static and you have 2 nodes (or 3 with
stacking + proxy), using DRBD8.4 is IMO perfectly fine.

Not every setup is OpenStack/OpenNebula/... with > 1000 resources.

Regards, rck
___
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] Adding additional 'node' to DRBD

2019-01-30 Thread Paul O'Rorke

Thanks Roland,

I am not sure if I should start a new topic for this, but now you have 
me wondering


I use a classic 3 node setup, LVM backing devices, and a stacked third 
node for DR using Protocol A.  I have a VPN between the main site and 
off-site and the latency hovers around 10ms.


Are there compelling reasons for me to look into DRBD 9?  My current 
setup is pretty solid, so far I have never needed to use the off site 
copies (touch wood).  I have 12 resources (all KVM HA servers) piped 
through the VPN.


regards

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

<http://www.tracker-software.com/>

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




On 2019-01-30 12:55 a.m., Roland Kammerer wrote:

On Tue, Jan 29, 2019 at 01:38:14PM -0800, Paul O'Rorke wrote:

What does node-id do?

With more than two nodes DRBD needs some information against which other
peer(s) it tracks changes. In DRBD8 you only have one peer, "easy", in
DRBD9 you have to know this is "Node A", this is "Node B",... Using
information that changes (e.g., hostnames) is too volatile. So one has
to give nodes an ID, a unique identifier that never changes. (There are
scenarios where you don't need them even in DRBD9 setups, but let's not
go down that rabbit hole).


Is it a drbd 9.0.x / Linstore thing?  I'm using 8.9.6

yes, a DRBD9 thing.

Regards, rck
___
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] Adding additional 'node' to DRBD

2019-01-29 Thread Paul O'Rorke
What does node-id do?  I have never used it and it's not listed in 
"Configuring your resource" 
https://docs.linbit.com/docs/users-guide-8.4/#s-configure-resource


My set up looks more like the example here:

resource r0 {
  on alice {
device/dev/drbd1;
disk  /dev/sda7;
address   10.1.1.31:7789;
meta-disk internal;
  }
  on bob {
device/dev/drbd1;
disk  /dev/sda7;
address   10.1.1.32:7789;
meta-disk internal;
  }
}

Is it a drbd 9.0.x / Linstore thing?  I'm using 8.9.6

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

<http://www.tracker-software.com/>

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




On 2019-01-17 1:19 a.m., Roland Kammerer wrote:

On Wed, Jan 16, 2019 at 09:47:05AM -0500, Shawn Southern wrote:

I'm very new to DRBD, so please bear with me if my terminology is wrong (or
if I've completely done everything wrong, please let me know!).  I've not
had much luck with finding this scenario in the documentation.

Initially, I only had a single system I could configure.  The other
identical system was running Hyper-V, so I had to get a system up with
CentOS, KVM & DRBD then migrate the workloads, then reformat the Hyper-V
box as CentOS, KVM & DRBD).

System 1 (vmh1) is 10.13.119.15, System 2 (vmh2) that I have to add is
10.13.119.16.  I've got the workload migrated to 'vmh1' and 'vmh2' is now
reinstalled with CentOS, KVM & DRBD.  What I need to know is how do I
safely add the sdb & sdc in vmh2 to the existing single node DRBD so that
it safely replicates the data and I don't lose my workload?

On both sides you change the res file like this:


in /etc/drdb.d I have:
file global_common.conf:
global {
  usage-count no;
}
common {
  net {
   protocol C;
  }
}

file drbd0.res:
resource drbd0 {
 device /dev/drbd0;
 meta-disk internal;
 net {
 cram-hmac-alg sha256;
 shared-secret "ThisIsSecret1";
 }
 on vmh1 {
 node-id 1;
 address 10.13.119.15:7789;
 disk /dev/sdb;
 }

^^ you add a "on vmh2" section with a different node-id;

^^ you add a "connection-mesh" section naming both nodes.


}

Then you:
- "drbdadm create-md" meta data on the second host
- "drbdadm adjust" on both.

Regards, rck
___
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] One resource per disk?

2018-05-10 Thread Paul O'Rorke

Too many drbd resources to manage.
I prefere a single resource, if possible.
fair enough.  I like the granularity and independence.  I have fewer 
than 20 resources/VMs.


I've no working experience with ZFS so I can't help you there. I'm 
pretty sure I've seen it discussed here though.  Have you gone through 
the archives?


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

<http://www.tracker-software.com/>

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




On 2018-05-10 12:44 PM, Gandalf Corvotempesta wrote:
Il giorno mer 2 mag 2018 alle ore 08:33 Paul O'Rorke 
<p...@tracker-software.com <mailto:p...@tracker-software.com>> ha scritto:


I create a large data drive out of a bunch of small SSDs using
RAID and make that RAID drive an LVM PV.

I can then create LVM volume groups and volumes for each use (in
my case virtual drives for KVM) to back specific DRBD resources
for each VM.  It allows me to have a DRBD resource for each VM,
each backed by an LVM volume which is in turn on a large LVM PV.

VM has DRBD resource as it's block device --> DRBD resources
backed by LVM volume --> LVM volume on a large RAID based Physical
Volume.

Too many drbd resources to manage.
I prefere a single resource, if possible.

What I would like is to create an HA NFS storage, if possible with ZFS 
but without putting ZFS on top of DRBD (i prefere the opposite: DRBD 
on top of ZFS)


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


Re: [DRBD-user] One resource per disk?

2018-05-02 Thread Paul O'Rorke
I create a large data drive out of a bunch of small SSDs using RAID and 
make that RAID drive an LVM PV.


I can then create LVM volume groups and volumes for each use (in my case 
virtual drives for KVM) to back specific DRBD resources for each VM.  It 
allows me to have a DRBD resource for each VM, each backed by an LVM 
volume which is in turn on a large LVM PV.


VM has DRBD resource as it's block device --> DRBD resources backed by 
LVM volume --> LVM volume on a large RAID based Physical Volume.


I can resize resources to my heart's content.  :-)

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

<http://www.tracker-software.com/>

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




On 2018-05-01 07:38 AM, Yannis Milios wrote:
I would prefer the 2nd option. Ideally all disks would be members of a 
RAID(10?) array, with  DRBD sitting on top for the replication, and 
LVM for managing the volume.
Another option would be ZFS managing the disks and the volume, while 
DRBD sitting on top for the replication. This very same scenario would 
also apply for LVM (thin or thick).

There's no right or wrong, depends on what your needs are.

I would avoid having single points of failure though, like single 
drives in any case...


On Tue, May 1, 2018 at 3:12 PM, Gandalf Corvotempesta 
<gandalf.corvotempe...@gmail.com 
<mailto:gandalf.corvotempe...@gmail.com>> wrote:


Hi to all
Let's assume 3 servers with 12 disks each
Would you create one resource per disk and then manage them with
something like LVM or a single resource from a huge volume over
all disks?

___
drbd-user mailing list
drbd-user@lists.linbit.com <mailto:drbd-user@lists.linbit.com>
http://lists.linbit.com/mailman/listinfo/drbd-user
<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


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


[DRBD-user] Correct way to lvreduce a drbd volume

2018-04-07 Thread Paul O'Rorke

Hi list,

I have an LVM backed DRBD resource for a libvirt VM that I wish to 
reduce in size however neither lvresize nor resize2fs are working for me.


backing device for the volume is */dev/trk-kvm-02-vg/blmail* and is 
currently 300G and I want to bring it down to 30G.  My intended use for 
this server has changed.


   root@trk-kvm-02:~/scripts# lvs
  LV    VG    Attr   LSize Pool Origin
   Data%  Meta%  Move Log Cpy%Sync Convert
  [...]
  blmail    trk-kvm-02-vg -wi-a- 300.00g
  [...]

I bring down the resource and try lvresize on /dev/trk-kvm-02-vg/blmail:

   root@trk-kvm-02:~/scripts# lvreduce --resizefs -L 30G
   /dev/trk-kvm-02-vg/blmail
   fsck from util-linux 2.27.1
   fsadm: Filesystem "drbd" on device
   "/dev/mapper/trk--kvm--02--vg-blmail" is not supported by this tool
  fsadm failed: 1
  Filesystem resize failed.

So I thought I'd use a hammer and resize the file system and dd it onto 
a new smaller LVM volume and recreate new drbd meta-data if needed:


   root@trk-kvm-02:~/scripts# resize2fs /dev/trk-kvm-02-vg/blmail 30G
   resize2fs 1.42.13 (17-May-2015)
   resize2fs: Bad magic number in super-block while trying to open
   /dev/trk-kvm-02-vg/blmail
   Couldn't find valid filesystem superblock.

I would seem to be barking up the wrong tree.  Can anyone point me in 
the right direction for documentation or suggest what is the right 
approach to reducing this volume?


please and thanks

--

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

<http://www.tracker-software.com/>

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


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 <http://www.tracker-software.com/>
Tel: +1 (250) 324 1621
Fax: +1 (250) 324 1623

<http://www.tracker-software.com/>

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 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 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 <http://www.tracker-software.com/>
Tel: +1 (250) 324 1621
Fax: +1 (250) 324 1623

<http://www.tracker-software.com/>

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 vo

[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 <http://www.tracker-software.com/>
Tel: +1 (250) 324 1621
Fax: +1 (250) 324 1623

<http://www.tracker-software.com/>

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


[DRBD-user] formatting a DRBD resource

2014-01-29 Thread Paul O'Rorke

Hi all,

a quick question.  I have a DRBD resource that was once used as a drive 
for a Linux machine that used LVM.  I want to create a new VM (KVM 
based) that uses this resource.  I can start the installation OK - the 
installer 'sees' the 300GB drive (/dev/drbd/by-res/resource) but when 
I try using the partition manager in the Debian (guest) installer it 
complains that there is already LVM data on there and it won't allow me 
to use the drive without first cleaning up the LVM config on there.


Is it possible to mount the resource in the host and use the command 
line LVM tools to 'clean' that up?  I was thinking that maybe I could 
use *dd* to clone a new clean resource of the same size but that seems 
silly.


Does anyone have any suggestions for 'formatting' this resource so that 
it looks again like a clean un-partitioned disk?


Thanks in advance.
--

*Paul O'Rorke*
Tracker Software Products
p...@tracker-software.com mailto:paul.oro...@tracker-software.com

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


[DRBD-user] Adding a third node

2013-09-24 Thread Paul O'Rorke

Hi all,

I have a 2 node set up with both nodes in my server room using a GB 
Ethernet direct connection between NICs for the DRBD resources using 
Protocol C and single primary. It's working nicely.


We want now to add a third node using probably Protocol A at an off site 
location to be used primarily for disaster recovery should the office 
burn to the ground...


I used a direct CAT6 connection between the first 2 nodes and I want to 
extend that now to do exactly this: 
http://www.drbd.org/users-guide-8.3/s-three-way-repl.html but I'm 
struggling to find documentation on how to move forward with that given 
I already have the Lower Layer in place and functional.


Any suggested reading/resources would be appreciated, I'm a little 
concerned that I should have started out with a stacked set up in the 
first place. Is it possible to add this to an existing set up?


Please and thanks

--

*Paul O’Rorke*
Tracker Software Products
p...@tracker-software.com mailto:paul.oro...@tracker-software.com

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


Re: [DRBD-user] Best Practice for DRBD+LVM+KVM

2013-06-20 Thread Paul O'Rorke

Simon,

thank you so much.  I saw a reference to that on the pages about xen and 
should have realized it would apply to any virtual environment.  Doh!


Writing to /dev/drbd/by-res/r1 did it and I now have my first vm ticking 
along nicely through DRBD and I'm a very happy camper.


Thanks again for the prompt and excellent solution.

Cheers

*Paul O'Rorke*
Tracker Software Products
p...@tracker-software.com mailto:paul.oro...@tracker-software.com


PLEASE NOTE : - If you are sending files for us to look at or assist with
these must ALWAYS be wrapped in either a ZIP/RAR or 7z FILE
or they will be removed by our Firewall/Virus management software.


**Certified by Microsoft**
Works with Vista
PDF-XChange  SDK, Image-XChange
PDF-Tools  SDK, TIFF-XChange  SDK.

Support:
http://tracker-software.com/support/
or
http://www.tracker-software.com/forum/index.php

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

On 6/20/2013 1:16 PM, Simon Ironside wrote:

On 20/06/13 17:51, Paul O'Rorke wrote:


Does anyone have any thoughts on why my data doesn't seem to be
replicating or perhaps point me in the right direction for how to dig a
little deeper.  My limited understanding is that DRBD should be between
my host and the LVM volume but perhaps it's writing directly to the LV
and not going through DRBD.


Hi Paul,

What did you configure your VM to use as its disk?
/dev/VirtualMachines/test2 or /dev/drbd/by-res/r1 (/dev/drbd2)?

If you used /dev/VirtualMachines/test2 then that's what's wrong. your 
reads and writes are bypassing DRBD. The only thing that should be 
using /dev/VirtualMachines/test2 is DRBD, your VM should write to 
/dev/drbd/by-res/r1


Cheers,
Simon



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