[DRBD-user] Move LVM back DRBD to different volume group?

Felix Frank ff at mpexnet.de
Mon Nov 15 12:41:02 CET 2010

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


On 11/15/2010 10:47 AM, Robert Dunkley wrote:
> Hi,
> 
> 
> Has anyone done this? 
> 
> I was planning as follows:
> drbdadm detach resource

So you're keeping it connected to the peer and go Diskless? I'm not sure
that this is a good idea.

> lvm
> lvcreate newlv (Same size on different volume group)
> dd if=/oldLV of=/newLV
> change path in drbd.conf
> drbdadm attach resource

Sounds to me as if an adjust is in order before that. And that may not
work as easily.

> lvremove oldLV
> 
> There are a couple of things I'm unsure of:
> Will the method above copy the DRBD meta data and will DRBD know to
> resynch?

This should work as far as I can see it.

> How can I ensure the LVM volume is the exact same size? (Or is it best
> to just create the new LV 1 MB bigger)

If memory serves correctly, the lv* commands can work with the "sectors"
unit as well. When that's used, the accuracy should be appropriate.

I'm not sure whether it's wise to do this kind of switch on-line, but it
should be possible.

Regards,
Felix



More information about the drbd-user mailing list