Assemble DRBD using the known size
authorIustin Pop <iustin@google.com>
Wed, 3 Jun 2009 12:21:06 +0000 (14:21 +0200)
committerIustin Pop <iustin@google.com>
Wed, 3 Jun 2009 16:09:54 +0000 (18:09 +0200)
commitf069addf353513ae981a6139ad9f223cbba71542
treeaeeb516317d0e5932be653f84f3050fac0f5c6c0
parent8a6c7011d1ccaa90a0a519563ef81dd139bc8484
Assemble DRBD using the known size

This patch changes DRBD disk attachment to force the wanted size, as opposed to
letting the device auto-discover its size.

This should make the disks more resilient with regard to small differences in
size (e.g. due to LVM rounding). This still works with regard to disk
growth, but the instances needs to be fully restarted (including disks)
in that case.

This passes a full burning without problems, but it's still a tricky
change - if the config.data is not synced with the reality, we might
tell DRBD a wrong size. At least this will fail outright (and not
introduce silent errors), as DRBD (per a quick check at the sources)
tracks the size in the meta-dev and also does not allow shrinking
consistent devices.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
lib/bdev.py