Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
/ 2004-10-04 16:46:16 -0700 \ Tim Hasson: > > 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 unfortunately, this does not work properly: heartbeat likes to call "status" often, and drbddisk all status is not implemented, and does not make much sense from the heartbeat perspective, either. so, from the heartbeat perspective, drbddisk all status will always report the resources as stopped... so better use drbddisk::r0 drbddisk::r1 > 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? I thought about something like this: ll_dev0=/dev/ll_dev_of_drbd0 ll_dev1=/dev/ll_dev_of_drbd1 size_of_ll0=$(fdisk -s $ll_dev0) size_of_ll1=$(fdisk -s $ll_dev1) echo "\ 0 $[size_of_ll0<<1] linear $ll_dev0 0 $[size_of_ll0<<1] $[size_of_ll1<<1] linear $ll_dev1 0" | dmsetup create ll_linear_for_drbd drbd.conf: disk /dev/mapper/ll_linear_for_drbd > 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? see above... device mapper is a smart piece of code. pretty cool things you can do with dm. lvm2 is just one of them. > > 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! :) man dmsetup :-) Lars Ellenberg -- please use the "List-Reply" function of your email client.