diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2020-01-13 17:27:24 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2020-01-13 17:42:31 +0100 |
commit | 7737ffb11ceba0f4220e1dfb79b8e97f20e7b8e9 (patch) | |
tree | ec6ad02af0f749b3584c934136b63ae10b408c3b | |
parent | dad2660a387ed32dc8146b497d279089c1ce48ed (diff) | |
download | lvm2-7737ffb11ceba0f4220e1dfb79b8e97f20e7b8e9.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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index a1c51aad7..48550399b 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -6438,6 +6438,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 */ |