Skip to content
Snippets Groups Projects
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 <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent dc922da0
No related branches found
No related tags found
No related merge requests found
......@@ -1129,9 +1129,10 @@ class DRBD8(BaseDRBD):
"""
args = ["drbdsetup", cls._DevPath(minor), "disk",
backend, meta, "0",
"-d", "%sm" % size,
"-e", "detach",
"--create-device"]
if size:
args.extend(["-d", "%sm" % size])
result = utils.RunCmd(args)
if result.failed:
_ThrowError("drbd%d: can't attach local disk: %s", minor, result.output)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment