[DRBD-user] Guide to growing DRBD on raw partitions under clustered LVM

Lars Ellenberg lars.ellenberg at linbit.com
Tue Aug 5 11:11:22 CEST 2014

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

On Mon, Aug 04, 2014 at 10:06:01PM -0400, Digimer wrote:
> Hi all,
>   Your friendly neighbourhood documentor decided to work out how to
> grow storage in HA clusters using DRBD.
> https://alteeve.ca/w/Anvil!_Tutorial_2_-_Growing_Storage
>   It's based around the main Anvil! tutorial, but it should be easy
> to adapt to pretty much any situation that is using DRBD on raw
> partitions. In my case, I do this because it gets complicated mixing
> LVM under DRBD and clustered LVM over DRBD.
>   Spelling/grammer/logic mistakes, please let me know. :)

Many people find your tutorials.
Because, well, you know ;-)

So my guess is, people will find this tutorial soon,
when they search for DRBD and resize,
right next to the DRBD User's Guide.

We will update that one, if we have not already.

But it won't hurt to add a warning note to your tutorial
about resizing as well:
I seriously broke certain scenarios of resize,
leading to data loss/corruption.

I paste the commit that fixed it below.
The issue is with *offline* resize with *internal* meta data,
while intending to keep the data in place.

For this scenario,
drbdmeta up to and including 8.4.2 is ok afaik,
drbdmeta in 8.4.3 and 8.4.4 is broken,
drbdmeta from drbd-utils 8.9.0 and above is ok again.

(No comment on your tutorial itself,
I did not really read through it yet.)

commit 4413afe8ed9819d45e7575c635e062ce2202cbbe
Author: Lars Ellenberg <lars.ellenberg at linbit.com>
Date:   Fri Jun 6 18:11:55 2014 +0200

    drbdmeta: fix data corruption during offline resize

    Regression introduced in 8.4.3, still present in 8.4.4.

    When offline resizing internal meta data, drbdmeta forgot to
    properly re-initialize the new meta data offsets in time,
    and would move the old meta data into the existing data area,
    starting with offset 0 instead, thereby corrupting the first part
    of the data, up to the size of the old bitmap area.
    (embeded disk image partition table, file system super block,
    top level directory, all gone!)

More information about the drbd-user mailing list