diff --git a/WHATS_NEW b/WHATS_NEW index e29ec7066..2942b0e53 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.03.17 - =============================== + Fix 'lvremove -S|--select LV' to not also remove its historical LV right away. Fix lv_active field type to binary so --select and --binary applies properly. Switch to use mallinfo2 and use it only with glibc. Error out in lvm shell if using a cmd argument not supported in the shell. diff --git a/lib/metadata/lv.h b/lib/metadata/lv.h index 304ee2f7d..e591a9510 100644 --- a/lib/metadata/lv.h +++ b/lib/metadata/lv.h @@ -93,6 +93,7 @@ struct historical_logical_volume { struct dm_list indirect_glvs; /* list of struct generic_logical_volume */ unsigned checked:1; /* set if this historical LV has been checked for validity */ unsigned valid:1; /* historical LV is valid if there's at least one live LV among ancestors */ + unsigned fresh:1; /* historical LV has just been created (the original LV just removed) */ }; struct generic_logical_volume { diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c index a6bfc2deb..559b07ba8 100644 --- a/lib/metadata/pool_manip.c +++ b/lib/metadata/pool_manip.c @@ -169,6 +169,7 @@ static struct glv_list *_init_historical_glvl(struct dm_pool *mem, struct lv_seg hlv->name = seg->lv->name; hlv->vg = seg->lv->vg; hlv->timestamp = seg->lv->timestamp; + hlv->fresh = 1; dm_list_init(&hlv->indirect_glvs); glvl->glv->is_historical = 1; diff --git a/tools/toollib.c b/tools/toollib.c index e45afb6ee..5305e811b 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -3450,6 +3450,9 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg, goto_out; } + if (glvl->glv->historical->fresh) + continue; + process_lv = process_all; if (lvargs_supplied &&