summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2012-03-27 12:01:22 +0000
committerMilan Broz <mbroz@redhat.com>2012-03-27 12:01:22 +0000
commitbe36c0ec49001acc5c8d3293db44521b2010be99 (patch)
treed4166171632caa212c39678abd1dfde153d7a566 /tools
parent3d5d5196d063b3cc9eba5962f6a5dc74e784bd01 (diff)
downloadlvm2-be36c0ec49001acc5c8d3293db44521b2010be99.tar.gz
lvm2-be36c0ec49001acc5c8d3293db44521b2010be99.tar.xz
lvm2-be36c0ec49001acc5c8d3293db44521b2010be99.zip
Fail early if cmirror is not detected and pvmove requires it.
Diffstat (limited to 'tools')
-rw-r--r--tools/pvmove.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c
index a81bce30..05ef33cc 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -274,7 +274,15 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
return NULL;
}
- if (lv_exclusive_count) {
+ if (vg_is_clustered(vg) && lv_active_count && *exclusive) {
+ log_error("Cannot move in clustered VG %s, "
+ "clustered mirror (cmirror) not detected "
+ "and LVs are activated non-exclusively.",
+ vg->name);
+ return NULL;
+ }
+
+ if (vg_is_clustered(vg) && lv_exclusive_count) {
if (lv_active_count) {
log_error("Cannot move in clustered VG %s "
"if some LVs are activated "