You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

WHATS_NEW | 1 +
lib/metadata/raid_manip.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/WHATS_NEW b/WHATS_NEW
index ac70074..01d0bc6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.187 -
===================================
+ Prevent raid reshaping of stacked volumes.
Fix lvmetad shutdown and avoid lenghty timeouts when rebooting system.
Prevent creating VGs with PVs with different logical block sizes.
Pvmove runs in exlusively activating mode for exclusively active LVs.
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index bffae60..768f261 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -6445,6 +6445,12 @@ int lv_raid_convert(struct logical_volume *lv,
uint32_t available_slvs, removed_slvs;
takeover_fn_t takeover_fn;
+ /* FIXME Can't reshape volume in use - aka not toplevel devices */
+ if (!dm_list_empty(&lv->segs_using_this_lv)) {
+ log_error("Can't reshape stacked volume %s.", display_lvname(lv));
+ return 0;
+ }
+
/* FIXME If not active, prompt and activate */
/* FIXME Some operations do not require the LV to be active */
/* LV must be active to perform raid conversion operations */