[DRBD-user] Setting up per-VM LVM volumes as individual DRBD mirrors - compatible?

Vladislav Bogdanov bubble at hoster-ok.com
Fri Oct 26 07:49:50 CEST 2012

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


25.10.2012 19:55, Whit Blauvelt wrote:
> On Thu, Oct 25, 2012 at 12:34:40PM -0400, Whit Blauvelt wrote:
> 
>> The easy road appears to be blocked, though. with this edited XML:
>>
>>     <disk type='block' device='disk'>
>>       <driver name='qemu' type='raw'/>
>>       <source dev='/dev/drbd/by-res/sql'/>
>>       <target dev='hda' bus='ide'/>
>>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>>     </disk>
>>
>> the result is:
>>
>>   # virsh start sql
>>   error: Failed to start domain sql
>>   error: unable to open disk path /dev/drbd/by-res/sql: Wrong medium type
>>
>> This is with virsh 0.9.12. Also fails when skipping the symlink: <source dev='/dev/drbd12'/>
>> leads to exactly the same failure. Either I'm missing another tweak, or this
>> setup isn't currently compatible.
> 
> Do I have to do something crazy like stack another LVM volume group on top
> of DRBD, then put a logical volume in that, then clone the VM onto the top
> of that? So:

I use it with corosync, pacemaker, dlm and clvmd.

> 
>   VM
>   LV
>   VG
this ^ one is clustered in my case, so I activate individual volumes on
different hosts. drbd should be in active-active mode for this. I need
this anyways for live VM migrations.

>  DRBD
>   LV
>   VG
>  DISK
> 
> or should it work to have just
> 
>   VM
>  DRBD
>   LV
>   VG
>  DISK

This one should be safer (i.e. active-passive setup is sufficient to
spread VM load across hosts), but live migrations do not work and
configuration overhead is bigger.
If you need live migrations, then you need active-active setup with
proper fencing. And then you can go either way.

> 
> as I'm currently attempting, if I just tweak some other aspect here? For
> clarity, the scheme is to have a 1-to-1 correspondence between each VM and
> its backing DRBD instance, so that the DRBD primary assignment is atomic,
> and can be switched per VM between the two hosts.
> 
> Whit
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
> 




More information about the drbd-user mailing list