[lvm-devel] [PATCH 6/6] Thin: Support moving thin sub-LVs with pvmove

Jonathan Brassow jbrassow at redhat.com
Mon Aug 5 20:03:17 UTC 2013


Ignore top-level thin LVs while allowing processing of bottom-level
LVs.  This patch also enables pvmove of thin types which may be
on top of RAID or mirror LVs.
---
 tools/pvmove.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/tools/pvmove.c b/tools/pvmove.c
index 7d3f518..956b848 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -310,7 +310,8 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
 			continue;
 		}
 		seg = first_seg(lv);
-		if (seg_is_raid(seg) || seg_is_mirrored(seg)) {
+		if (seg_is_raid(seg) || seg_is_mirrored(seg) ||
+		    lv_is_thin_volume(lv) || lv_is_thin_pool(lv)) {
 			/*
 			 * Pass over top-level LVs - they were handled.
 			 * Allow sub-LVs to proceed.
@@ -319,13 +320,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
 				  seg->segtype->ops->name(seg), lv->name);
 			continue;
 		}
-		if (lv_is_thin_volume(lv) || lv_is_thin_pool(lv)) {
-			lv_skipped = 1;
-			log_print_unless_silent("Skipping thin%s LV %s",
-						lv_is_thin_pool(lv) ? "-pool" : "",
-						lv->name);
-			continue;
-		}
+
 		if (lv->status & LOCKED) {
 			lv_skipped = 1;
 			log_print_unless_silent("Skipping locked LV %s", lv->name);
-- 
1.7.7.6




More information about the lvm-devel mailing list