[DRBD-user] moving a drbd/xen/heartbeat to another cluster

Heiko rupertt at gmail.com
Tue Feb 17 09:48:45 CET 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Mon, Feb 16, 2009 at 8:30 PM, Lars Ellenberg
<lars.ellenberg at linbit.com> wrote:
> On Mon, Feb 16, 2009 at 01:19:26PM +0100, Heiko wrote:
>> On Mon, Feb 16, 2009 at 10:58 AM, Heiko <rupertt at gmail.com> wrote:
>> > Hello,
>> >
>> > we have one XEN VM that is running on a lvm device, replicated with
>> > drbd between 2 machines and we
>> > now need to move this setup to another pair of machines, What is the
>> > best way to do this?
>> > The new setup will have the same paramteter than the old one, 10GB LVM device.
>> >
>> >
>> I missed to give some infos,
>> all the hosts run on Centos 5.2, drbd ist 8.0.13-1, xen is 3.1.
>> Would this transfer work with  an simple dd of the drbd device?
>
> yes, but only if you quiescen it before you start the dd.
> downtime, obviously.
>
>> Is there a way to get nearly zero downtime by adding one of the new
>> server to the existing cluster,
>> than remove both old ones and add the second new server?
>> Has this be done before and how would look the complete procedure?
>
> I'd probably replace the current secondary with one of the new nodes,
> do a _full_ sync, then switch over, and replace the other node.
>
Hello Lars,

i wrote down all the steps I would do to transfer the VM to the new
pair of machines,
would this work that way or do I have any wrong steps in there?

--------start-----------

shutdown the 'old secondary' with "drbdadm down "resource""

remove it from the config file on the 'old secondary' server

change the resource to the new server on the 'old primary' (will this
work if there is more than one drbd device?)

Add the device to the 'new secondary' config file.

create the new device on the 'new secondary' with:

drbdadm create-md "resource"
drbdadm up "resource"
drbdadm secondary "resource"

than sync it, on the 'old primary' do:
drbdadm -- --overwrite-data-of-peer primary "resource"

when thats done, shut down the resource on the 'old primary' with
"drbdadm down "resource"".
remove it from the config file on the 'old primary'.

now add the resource to the configfile on the 'new primary' server.
change the resource in the configfile on the 'new secondary' to
reflect the new primary.

activate the new resource on the 'new primary' with

drbdadm create-md "resource"
drbdadm up "resource"
drbdadm secondary "resource"

sync from the new secondary to the new primary, on the new secondary

drbdadm -- --overwrite-data-of-peer primary "resource"

when thats done, make the 'new primary' a primary on the 'new primary':

drbdadm primary "resource"

start the xen VM

--------done-----------

thanks and greetings


.h

> depending on how much data this is about,
> I'd even consider taking one old node down,
> and plugging its backend storage into one of the new ones
> you only need a partial sync in this case, just those blocks that
> changed since you took the old node down.
>
> --
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
>
> DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.
> __
> please don't Cc me, but send to list   --   I'm subscribed
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>



More information about the drbd-user mailing list