diff --git a/WHATS_NEW b/WHATS_NEW index 649afe2da..7bd1653e0 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.06 - ================================= + Fix activation code to check for pre-existing mirror logs. Tighten region size validation. Ignore empty strings in config files. Require non-zero regionsize and document parameter on lvcreate man page. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index a58c5de3a..72482565f 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -616,6 +616,9 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, struc if (!_add_dev_to_dtree(dm, dtree, lv, "cow")) return_0; + if (!_add_dev_to_dtree(dm, dtree, lv, "_mlog")) + return_0; + return 1; } diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c index ec411c2ba..528c3b26f 100644 --- a/lib/misc/lvm-string.c +++ b/lib/misc/lvm-string.c @@ -159,7 +159,9 @@ char *build_dm_name(struct dm_pool *mem, const char *vgname, _quote_hyphens(&out, lvname); if (layer && *layer) { - *out++ = '-'; + /* No hyphen if the layer begins with _ e.g. _mlog */ + if (*layer != '_') + *out++ = '-'; _quote_hyphens(&out, layer); } *out = '\0'; diff --git a/tools/toollib.c b/tools/toollib.c index c8221850f..695f707d4 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -1090,12 +1090,14 @@ int generate_log_name_format(struct volume_group *vg, const char *lv_name, return 0; } + /* FIXME I think we can cope without this. Cf. _add_lv_to_dtree() if (find_lv_in_vg(vg, buffer) && lvm_snprintf(buffer, size, "%s_mlog_%%d", lv_name) < 0) { stack; return 0; } + *******/ return 1; }