diff options
author | Milan Broz <mbroz@redhat.com> | 2012-03-27 12:01:22 +0000 |
---|---|---|
committer | Milan Broz <mbroz@redhat.com> | 2012-03-27 12:01:22 +0000 |
commit | be36c0ec49001acc5c8d3293db44521b2010be99 (patch) | |
tree | d4166171632caa212c39678abd1dfde153d7a566 /tools/pvmove.c | |
parent | 3d5d5196d063b3cc9eba5962f6a5dc74e784bd01 (diff) | |
download | lvm2-be36c0ec49001acc5c8d3293db44521b2010be99.tar.gz |
Fail early if cmirror is not detected and pvmove requires it.
Diffstat (limited to 'tools/pvmove.c')
-rw-r--r-- | tools/pvmove.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c index a81bce304..05ef33cc5 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 " |