Commit e6c1ff2f authored by Iustin Pop's avatar Iustin Pop
Browse files

Use the same root for both _data and _meta LVs

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
parent 998c712c
...@@ -3809,11 +3809,11 @@ def _GenerateDiskTemplate(lu, template_name, ...@@ -3809,11 +3809,11 @@ def _GenerateDiskTemplate(lu, template_name,
minors = lu.cfg.AllocateDRBDMinor( minors = lu.cfg.AllocateDRBDMinor(
[primary_node, remote_node] * len(disk_info), instance_name) [primary_node, remote_node] * len(disk_info), instance_name)
names = _GenerateUniqueNames(lu, names = []
[".disk%d_%s" % (i, s) for lv_prefix in _GenerateUniqueNames(lu, [".disk%d" % i
for i in range(disk_count) for i in range(disk_count)]):
for s in ("data", "meta") names.append(lv_prefix + "_data")
]) names.append(lv_prefix + "_meta")
for idx, disk in enumerate(disk_info): for idx, disk in enumerate(disk_info):
disk_index = idx + base_index disk_index = idx + base_index
disk_dev = _GenerateDRBD8Branch(lu, primary_node, remote_node, disk_dev = _GenerateDRBD8Branch(lu, primary_node, remote_node,
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