1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
Zdenek Kabelac 2020-01-13 17:27:24 +01:00
parent dad2660a38
commit 7737ffb11c

View File

@ -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 */