[DRBD-user] DRBD-LVM sandwich questions

Adam Wilbraham adam.wilbraham at technophobia.com
Wed Jul 22 12:07: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 Dmitry,

I'm using a setup very similar to yours apart from the last part - I use 
a 1 LV to Xen partition mapping for all of our PV domUs. Its only the 
HVM ones which I use as a full disk image, but anyway its not too relevant.

Our backup strategy currently involves taking daily LVM snapshots and 
rsyncing data from them (or backing up using dd in case of HVM). Doing 
this means you aren't doing anything to the underlying device so removes 
any risk - just make sure your snapshot is big enough to cope with the 
amount of data that will change whilst it exists.

Whenever I do a resize of a LV & subsequent DRBD device I always 
schedule a reboot of the domU afterwards to make sure that the OS 
properly picks up the resize. I've not had any problems with either of 
these approaches so far.





On 21/07/09 22:49, Dmitry S. Makovey wrote:
> Hi everybody,
>
> we're running LVM-DRBD-Xen-LVM sandwich on our boxes and got an interesting
> question:
>
> 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" ?
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user


-- 
Adam Wilbraham - Systems Administrator
TechnoPhobia Limited
The Workstation
15 Paternoster Row
SHEFFIELD
England
S1 2BX
t: +44 (0)114 2212123
f: +44 (0)114 2212124
e: adam.wilbraham at technophobia.com
w: http://www.technophobia.com/

Registered in England and Wales Company No. 3063669
VAT registration No. 598 7858 42
ISO 9001:2000 Accredited Company No. 21227
ISO 14001:2004 Accredited Company No. E997
ISO 27001:2005 (BS7799) Accredited Company No. IS 508906
Investor in People Certified No. 101507

The contents of this email are confidential to the addressee
and are intended solely for the recipients use. If you are not
the addressee, you have received this email in error.
Any disclosure, copying, distribution or action taken in
reliance on it is prohibited and may be unlawful.

Any opinions expressed in this email are those of the author
personally and not TechnoPhobia Limited who do not accept
responsibility for the contents of the message.

All email communications, in and out of TechnoPhobia,
are recorded for monitoring purposes.



More information about the drbd-user mailing list