• Iustin Pop's avatar
    Assemble DRBD using the known size · f069addf
    Iustin Pop authored
    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: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
bdev.py 53.5 KB