diff --git a/WHATS_NEW b/WHATS_NEW index 3ba8e304d..78a8052d1 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.176 - =================================== + Disallow creation of snapshot of mirror/raid subLV (was never supported). Fix regression in more advanced vgname extraction in lvconvert (2.02.169). Allow lvcreate to be used for caching of _tdata LV. Avoid internal error when resizing cache type _tdata LV (not yet supported). diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index b03f9cf97..4cca5a108 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -7622,11 +7622,20 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, } if (lv_is_mirror_type(origin_lv)) { + if (!lv_is_mirror(origin_lv)) { + log_error("Snapshots of mirror subvolumes are not supported."); + return NULL; + } log_warn("WARNING: Snapshots of mirrors can deadlock under rare device failures."); log_warn("WARNING: Consider using the raid1 mirror type to avoid this."); log_warn("WARNING: See global/mirror_segtype_default in lvm.conf."); } + if (lv_is_raid_type(origin_lv) && !lv_is_raid(origin_lv)) { + log_error("Snapshots of raid subvolumes are not supported."); + return NULL; + } + if (vg_is_clustered(vg) && lv_is_active(origin_lv) && !lv_is_active_exclusive_locally(origin_lv)) { log_error("%s must be active exclusively to" diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 02c649c4f..390a784c5 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1945,8 +1945,9 @@ static int _lvconvert_snapshot(struct cmd_context *cmd, * LV_foo specification because this LV is not processed by process_each_lv. */ if ((lv_is_cache_type(org) && !lv_is_cache(org)) || - lv_is_thin_type(org) || - lv_is_mirrored(org) || + (lv_is_thin_type(org) && !lv_is_thin_volume(org)) || + (lv_is_mirror_type(org) && !lv_is_mirror(org)) || + (lv_is_raid_type(org) && !lv_is_raid(org)) || lv_is_cow(org)) { log_error("Unable to use LV %s as snapshot origin: invald LV type.", display_lvname(lv));