From e6c1ff2fee54cf957d6800c99afdfa3aeabbfac8 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 19 Jan 2009 10:43:11 +0000 Subject: [PATCH] Use the same root for both _data and _meta LVs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we use a different UUID for the _data and _meta volumes of a DRBD disk. This is confusing as it's hard to associate the two in the output of βlvsβ or βgnt-node volumesβ. The patch changes so that they use the same prefix. Reviewed-by: ultrotter --- lib/cmdlib.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index b239e67c6..0929c2ed2 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -3809,11 +3809,11 @@ def _GenerateDiskTemplate(lu, template_name, minors = lu.cfg.AllocateDRBDMinor( [primary_node, remote_node] * len(disk_info), instance_name) - names = _GenerateUniqueNames(lu, - [".disk%d_%s" % (i, s) - for i in range(disk_count) - for s in ("data", "meta") - ]) + names = [] + for lv_prefix in _GenerateUniqueNames(lu, [".disk%d" % i + for i in range(disk_count)]): + names.append(lv_prefix + "_data") + names.append(lv_prefix + "_meta") for idx, disk in enumerate(disk_info): disk_index = idx + base_index disk_dev = _GenerateDRBD8Branch(lu, primary_node, remote_node, -- GitLab