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

Whit Blauvelt whit+drbd at transpect.com
Thu Oct 25 18:55:35 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.


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:

  VM
  LV
  VG
 DRBD
  LV
  VG
 DISK

or should it work to have just

  VM
 DRBD
  LV
  VG
 DISK

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



More information about the drbd-user mailing list