[DRBD-user] DRBD 0.7.5 & LVM2 on 2.4.27

Tim Hasson tim at aidasystems.com
Tue Oct 5 01:46:16 CEST 2004

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


Hi List,

Quoting Lars Ellenberg <Lars.Ellenberg at linbit.com>,
on Mon, 4 Oct 2004 14:34:41 +0200:
> 
> well use a 2.6 kernel and be happy.

I wish. Unfortunately, the LVM2/dm code for 2.6.x is currently marked as
experimental and only the 2.4.x code is considered stable..

> 
> this is nothing to worry about, though, just a log message.
> 

I thought so, but just wanted to make sure because I saw something about race
conditions related to some asserts in the 0.7.5 changelog.

> 
> an additional note, though.
> 
> make sure that if you failover, you failover BOTH pvs...
> 

Of course! That's common sense, since my LV maps to both pvs.

[root at srv1 root]# cat /etc/ha.d/haresources
srv1.aidasystems.com \
        192.168.10.15 \
        drbddisk::all \
        lvm2 \
        Filesystem::/dev/Volume0/LogVol0::/data::ext3::usrquota


And lvm2 is a script in /etc/init.d/ that simply loads the dm-mod and dm-mirror
modules at start, followed by "vgscan" and "vgchange -a y". While "lvm2 stop"
simply does "vgchange -a n" to deactivate the volume when heartbeat is stopping
(before drbddisk stop).


> to simplify management, you could put a linear mapping on both
> lower level devices first, then put drbd on top of that linear mapping,

Now I am totally confused. I thought LVM had a problem with drbd because of the
latter's transparency, and that's why the filters are required in lvm.conf to
prevent it from accessing the lower block device directly without going through
drbd first?

What I basically did is:
1. Subtract 132Mb from the total disk size on each (2 disks are same size btw)
2. Create the large partition on each disk (w/ fdisk), then the small 132MB
partition on each - for the DRBD meta data.
3. Configured drbd with the drbd.conf I showed earlier, so that I have a drbd0
volume on /dev/sdb1 (w/ metadata on /dev/sdb2) and drbd1 on /dev/sdc1 (w/
metadata on /dev/sdc3)
4. "drbddisk all up"
5. "pvcreate /dev/drbd0" and "pvcreate /dev/drbd1"
6. Then I did "vgcreate Volume0 /dev/drbd0 /dev/drbd1", followed by lvcreate
with the max LE size of the vg.


> and then put your lvm2 vg on top of that single drbd.

I am getting even more confused. How do you get a single drbd volume from two
pvs without creating a vg and lv on them first?

> but then don't use "drbd internal meta data" on that, if you think about
> later maybe adding more harddisks to the lower linear mapping and
> resizing the drbd device.
> but maybe "just a wrapper script" will do, too.

As I am still lost, my only guess is that the "lower linear mapping" that you
mentioned is basically a hardware level thing (i.e. via the scsi controller) on
which you put drbd0 on?
But that does not explain the "simplified management" part.

Help! :)

Tim




More information about the drbd-user mailing list