summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2020-01-13 17:27:24 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2020-01-13 17:41:22 +0100
commit36210c2b491424d7a0ab27d0a65effd6fc6ecc4c (patch)
tree390bc6e4d856437744000dc1ec94fcbc60bd8c83
parent50c56ade2a7a89f751091669fb8b31854f93eff1 (diff)
downloadlvm2-36210c2b491424d7a0ab27d0a65effd6fc6ecc4c.tar.gz
raid: disallow reshape of stacked LVs
Until we resolve reshape for 'stacked' devices, we need to disable it. So users can no longer reshape i.e. thin-pool data volumes, causing ATM bad thin-pool problems.
-rw-r--r--lib/metadata/raid_manip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 90302617f..548faf139 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -6444,6 +6444,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 */