[DRBD-user] DRBD8, dedicated repository for PVE 4

Cesar Peschiera brain at click.com.py
Sat Dec 24 15:12:13 CET 2016

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

Hi Jasmin

> I guess there is no big difference between
>    PhysDisk / DRBD8 / LVM
> or
>    PhysDisk / LVM / DRBD8
> I read LVM is really simple implemented within the Kernel via a mapper and
> doesn't add much execution time. And the additional LVM execution time is
> the same for both variants.
As you tell us about of "LVM / DRBD8 / LVM ",
and i use for each PVE Node a LVM-Partition ...
LVM-Partition / DRBD / LVM-PV / LVM-VG / LVM-LV(the virtual disk)
I guess that you are talking of use two LVM partitions, and my question of
performance is compared with it.
Other questions:
1- Will work your storage plugin with my setup explained above?, or
2- What setup must i have? (Please explain in detail such setup)

> When you are using PhysDisk / DRBD8 / LVM in Proxmox you can define this
> as a shared Storage, but who act/deactivates DRBD8 in this case?
> I had it hat way, but then I discovered I needed other scripts to deal
> with
> DRBD8. Moreover I had multiple VMs using the same DRBD8 device because i
> had
> a single LVM VG for all my VMs disks. This was a big problem, because I
> had
> to keep all VMs using the same DRBD8 disk on one server. Otherwise I could
> get a Split Brain situation and also I needed dual primary mode in DRBD8.
For solve Split Brain problems very quickly, and while that the VMs are
running (online), it is that i have a LVM-Partition/DRBD/etc... for each PVE
Node, and each PVE Node can have a max of two LVM partitions with DRBD8 if i
run VMs in both PVE Nodes.

> So I have now PhysDisk / LVM / DRBD8 and my Proxmox Storage Plugin. I
> configure LVM and DRBD8 completely manual (per diks!). Then Proxmox and my
> Plugin do the magic of act/deactivating and primary/secondary switching.
> And
> the most important, I have now independent DRBD8 instances per VM disk.
> Using
> this configuration with single primary mode is very save, I guess and
> should
> avoid a split brain situation per design. This was not possible in Proxmox
> prior, because of the missing DRBD8 Storage Plugin.
It is beautiful.

> > 2- As i use the DRBD verify online once a week,  and i want that this
> > process not take long, then, my LVM partitions on top of DRBD only has
> > the
> > minimal size necessary for the disks of VMs, instead of use the complete
> > disk of the server.
> I had it configured exactly the same, but then you share a DRBD8 for
> several
> VMs. If you have a DRBD8 / LVM instance per VM you should be fine,
I have a LVM/DRBD8/...etc(as is explained above) partition for each PVE 
Node, not for each VM, and also be fine for solve very quickly the split 
brain problems in mode online while that the VMs are running.

> but this
> requires scripts to activate DRBD8 and you have to deal in this script
> with
> VMs moved to the other server and thus are not allowed to switch DRBD8 to
> primary (unless you are using dual primary mode).
For that the online migration of VMs work well  in PVE with the DRBD8
instance in primary-secondary mode, i  guess that is necessary create a
second plugin for it, and this plugin must do this:
1- Compare the sync of the DRBD resources and know if them are well.
2- If the DRBD resources are sync correctly, change the  DRBD resource to
primary in the other PVE Node, else, show a error message and abort this
3- Run the VM migration.
4- Change the  DRBD resource to secondary in the first PVE Node.

> > The disadvantage of this strategy is that when i need resize the disk of
> > the
> > VM, i must do it in offline mode, but with a few steps. I can live well
> > with
> > this method.
> I am not sure if PhysDisk / LVM / DRBD8 allows online resizing. I never
> tried
> it. But when I think now ... LVM allows simply resizing the LV. DRBD8
> allows
> this too: https://www.drbd.org/en/doc/users-guide-84/s-resizing
> After resizing LVM/DRBD8 log into your VM and do an online resize of the
> mounted partition (sudo resize2fs /dev/vd*, if it is ext4).
I did several tests about that, and i can say with certainty that in DRBD8
the online resize only is possible if the VM is not running and the DRBD
resource is unmounted in the host (very tested in my lab with his possible
alternatives, always with the condition that resource DRBD be as small as
possible, ie, according to the size of the Virtual disk)

> BR,
>    Jasmin


More information about the drbd-user mailing list