Skip to content
Snippets Groups Projects
Commit d30fa488 authored by Thomas Thrainer's avatar Thomas Thrainer Committed by Guido Trotter
Browse files

Support DRBD 8.4.3 command syntax


DRBD 8.4.3 does not support specifying volume ids directly while
creating the meta device. It requires a slightly different syntax (using
flex-external as volume id) which is fortunately also supported by (at
least) DRBD 8.4.2.

Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 5519f036
No related branches found
No related tags found
No related merge requests found
......@@ -306,7 +306,7 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator):
def GenInitMetaCmd(self, minor, meta_dev):
return ["drbdmeta", "--force", self._DevPath(minor),
"v08", meta_dev, "0", "create-md"]
"v08", meta_dev, "flex-external", "create-md"]
def GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params):
cmds = []
......@@ -317,9 +317,9 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator):
# We need to apply the activity log before attaching the disk else drbdsetup
# will fail.
cmds.append(["drbdmeta", self._DevPath(minor),
"v08", meta_dev, "0", "apply-al"])
"v08", meta_dev, "flex-external", "apply-al"])
attach_cmd = ["drbdsetup", "attach", minor, data_dev, meta_dev, "0",
attach_cmd = ["drbdsetup", "attach", minor, data_dev, meta_dev, "flexible",
"--on-io-error=detach"]
if size_mb:
attach_cmd.extend(["--size", "%sm" % size_mb])
......
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