Commit 60bca04a authored by Iustin Pop's avatar Iustin Pop
Browse files

bdev: allow ignoring of size in Assemble()

This patch changes the DRBD8 class (the only one to use the size in
Assemble) to ignore the size in Assemble when a zero size is passed.
This will allow activation of disks even when the size recorded in the
configuration is wrong.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent dc922da0
...@@ -1129,9 +1129,10 @@ class DRBD8(BaseDRBD): ...@@ -1129,9 +1129,10 @@ class DRBD8(BaseDRBD):
""" """
args = ["drbdsetup", cls._DevPath(minor), "disk", args = ["drbdsetup", cls._DevPath(minor), "disk",
backend, meta, "0", backend, meta, "0",
"-d", "%sm" % size,
"-e", "detach", "-e", "detach",
"--create-device"] "--create-device"]
if size:
args.extend(["-d", "%sm" % size])
result = utils.RunCmd(args) result = utils.RunCmd(args)
if result.failed: if result.failed:
_ThrowError("drbd%d: can't attach local disk: %s", minor, result.output) _ThrowError("drbd%d: can't attach local disk: %s", minor, result.output)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment