From ab6cc81cea58f7bfb619bab1b13f3db182b6a38b Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sat, 10 May 2008 08:25:57 +0000 Subject: [PATCH] DRBD: Fix another bug in diskless activation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DRBD8 requires that we pass β--create-deviceβ to the first command that wants to activate a new DRBD minor. We do this currently when we run the βdrbdsetup ... diskβ command which we run before the network setup. But if the LVs are missing, we skip the βdiskβ subcommand and run only the βnetβ one, so it might be that the activation fails because the minor we selected was never created in the first place. The patch adds the required parameter to the DRBD8._AssembleNet() call. Since it's a no-op for existing minors, it should not create any problems (tested and works both with configured and unconfigured minors). Reviewed-by: ultrotter --- lib/bdev.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bdev.py b/lib/bdev.py index da29f5dad..9c9e10765 100644 --- a/lib/bdev.py +++ b/lib/bdev.py @@ -1817,6 +1817,7 @@ class DRBD8(BaseDRBD): "%s:%s" % (lhost, lport), "%s:%s" % (rhost, rport), protocol, "-A", "discard-zero-changes", "-B", "consensus", + "--create-device", ] if dual_pri: args.append("-m") -- GitLab