From d6fcab900b5b33c55c7894c3f4a7cdd1dbb81c1a Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 23 Oct 2017 11:20:32 +0200 Subject: [PATCH] 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 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 2644d37ea..2f08468be 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -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. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index c0e9a99ab..b03f9cf97 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -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; }