diff --git a/WHATS_NEW b/WHATS_NEW index 519d4ddc7..b5b774f5c 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Disallow pvmove on RAID LVs until they are addressed properly Allow empty activation/{auto_activation|read_only|}_volume_list config option. Add lvm.conf option global/thin_disabled_features. Add lvconvert support to swap thin pool metadata volume. diff --git a/tools/pvmove.c b/tools/pvmove.c index 9649f1194..fcc5b31ea 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -179,6 +179,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd, unsigned *exclusive) { struct logical_volume *lv_mirr, *lv; + struct lv_segment *seg; struct lv_list *lvl; uint32_t log_count = 0; int lv_found = 0; @@ -206,6 +207,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd, /* Find segments to be moved and set up mirrors */ dm_list_iterate_items(lvl, &vg->lvs) { lv = lvl->lv; + seg = first_seg(lv); if (lv == lv_mirr) continue; if (lv_name) { @@ -218,6 +220,19 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd, log_print_unless_silent("Skipping snapshot-related LV %s", lv->name); continue; } + if (seg_is_raid(seg)) { + lv_skipped = 1; + log_print_unless_silent("Skipping %s LV %s", + seg->segtype->ops->name(seg), + lv->name); + continue; + } + if (lv_is_raid_type(lv)) { + lv_skipped = 1; + log_print_unless_silent("Skipping RAID sub-LV %s", + lv->name); + continue; + } if (lv->status & MIRRORED) { lv_skipped = 1; log_print_unless_silent("Skipping mirror LV %s", lv->name);