[DRBD-user] DRBD-LVM sandwich questions

Dmitry S. Makovey dmitry at athabascau.ca
Tue Jul 21 23:49:32 CEST 2009

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

Hi everybody,

we're running LVM-DRBD-Xen-LVM sandwich on our boxes and got an interesting 

as you can see from above we have LV (say /dev/system/lv1) which we use as a 
base for DRBD device (say /dev/drbd0, named "vmspace") which is then used as 
a raw disk for Xen VM (say myVM). Inside of myVM we use LVM again to manage 
partitions etc. (say we have /dev/vmsystem VG inside with lots of various LVs 
in that VG). 

Now above we've used to be able to dynamically grow our VMs if needed. 
Scenario looks like this: we do

lvresize /dev/system/lv1
drbdadm resize vmspace
...inside of VM
fdisk /dev/xvda
...add another partition /dev/xvda3
vgextend /dev/xvda3
lvresize /dev/vmsystem/lvX
resize2fs  /dev/vmsystem/lvX

Now another thing that happened after using above scenario:

running fdisk -l /dev/system/lv1 we saw different picture on primary and 
secondary DRBD box until secondary was rebooted.

Now the actual questions:

1. why did fdisk report /dev/system/lv1 layout different for primary and 
secondary (probably not-so-much DRBD question, but it kind of is related). By 
different I mean - it was showing the size of /dev/xvda correctly, but it was 
showing only 2 partitions on secondary box and 3 on primary

2. is it OK to use LVM snapshots for /dev/system/lv1 on secondary box to 
create "copies" of running VM to get some migration/testing done? (I realize 
problems about snapshoting running system, but are there any other problems)?

3. I remember seeing some information about "not touching raw devices 
underneath DRBD devices" and I also remember reading that even read-only 
mounts along with other apparently "innocent" operations still modify 
underlying devices. Does anybody have reference to the list of those "big 
no-no's" ?

Dmitry Makovey
Web Systems Administrator
Athabasca University
(780) 675-6245
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20090721/ca703050/attachment.pgp>

More information about the drbd-user mailing list