master - lvextend: detect stacked cache lv used for thinpool
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d6fcab900b5b33c55c7894c3f4a7cdd1dbb81c1a Commit: d6fcab900b5b33c55c7894c3f4a7cdd1dbb81c1a Parent: de58df390b6bd3f46841fdacb9a75defccf9f3e2 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Oct 23 11:20:32 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Oct 23 12:00:43 2017 +0200
lvextend: detect stacked cache lv used for thinpool
Ensure, that cacheLV is not tried to be resize until full support is added.
--- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.176 - =================================== + Avoid internal error when resizing cache type _tdata LV (not yet supported). Show original converted names when lvconverting LV to pool volume. Move lib code used only by liblvm into metadata-liblvm.c. Distinguish between device not found and excluded by filter.
lib/metadata/lv_manip.c +2 -1
@@ -4797,7 +4797,8 @@ static int _lvresize_check(struct logical_volume *lv,return 0 ; } -if (lv_is_cache_type (lv)) { +if (lv_is_cache_type (lv) || + (lv_is_thin_pool (lv) &&lv_is_cache_type (seg_lv (first_seg (lv),0 )))) {log_error ("Unable to resize logical volumes of cache type." );return 0 ; }