----- Original Message -----
> From: "ShockwaveCS" <[email protected]>
> To: [email protected]
> Sent: Wednesday, November 14, 2012 1:53:05 PM
> Subject: [DRBD-user]  Migrate LVM to DRBD+LVM ?
> 
> 
> I need to migrate my existing LVM setup to drbd and I'm confused
> about
> meta-data, etc. I have done some reading and feel that I could
> benefit from
> starting the LVM's from scratch...but I cant do that.
> 
> In the past, I setup a system with LVM doing the following:
> 
> sdc 750GB RAID5 drive
> 
> On Node 1 and Node 2:
> pvcreate /dev/sdc
> --success
> vgcreate vg1 /dev/sdc
> --success
> lvcreate -L 500G -n data1 vg1
> --success
> 
> 
> sdd 500GB RAID10 Drive
> 
> pvcreate /dev/sdd
> --success
> vgcreate vg2 /dev/sdd
> --success
> lvcreate -L 200G -n data2 vg2
> --success
> 
> mkfs.ext3 /dev/mapper/vg1/data1
> --success
> mkfs.ext3 /dev/mapper/vg2/data2
> --success
> mount /dev/mapper/vg1/data1 /mnt/data1
> --success
> mount /dev/mapper/vg2/data2 /mnt/data2
> --success
> 
> So I'm trying to get DRBD up and running and started with the DRBD
> users
> guide. I couldnt find the appropriate way to get my LVM's properly
> initialized for use. create-md will destroy everything on the disks,
> so what
> do it do? external metadata? Where do I do this? I have space left on
> the
> two devices. is this where I configure the meta-data? Do I need to
> create
> another logical volume on each disk in order to get the
> external-meta-data
> to be used? Also, when doing this, what /etc/lvm/lvm.conf /udev
> rules/
> drbd.conf settings would I need?

You don't need to change anything here unless your are going to have LVM on top 
of DRBD on top of LVM.

> I had an issue in the past with
> heartbeat
> hating the way I had LVMs setup. heartbeats vgchange commands knocked
> out my
> VG's and wouldn't mount the drives anymore.

Assuming you want to have DRBD on top of the existing LVM you can do one of two 
things.  If you are going with DRBD 8.3.x more details about metadata here:
http://www.drbd.org/users-guide-8.3/ch-internals.html#s-metadata

Also mini how-to here from Lars a few years back:
http://lists.linbit.com/pipermail/drbd-user/2009-February/011464.html

1. Grow the logical volumes the appropriate amount to have room for the 
metadata at the end of the device.  Estimate the space need (pad it a little if 
you like) and expand the LV.  This method would be my preference.

2. Add another logical volume in each volume group to store the metadata.  
Estimate the space needed and create an LV each volume group for the metadata.

Estimate metadata size by taking data device size in MB divided by 32768 + 1 = 
metadata size in MB (see links above).  So for lv data1 metadata needs about 
16.7 MB of space. So I would grow the data1 lv at least 17MB (I might just grow 
it 1GB for a nice round number).  Then configure drbd configs and create-md.

HTH

Jake

> 
> --
> View this message in context:
> http://old.nabble.com/Migrate-LVM-to-DRBD%2BLVM---tp34680150p34680150.html
> Sent from the DRBD - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> drbd-user mailing list
> [email protected]
> http://lists.linbit.com/mailman/listinfo/drbd-user
> 
> 
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to