summaryrefslogtreecommitdiff
path: root/tools/pvmove.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pvmove.c')
-rw-r--r--tools/pvmove.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c
index 30725844c..c5efe32bc 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -734,6 +734,11 @@ static int _set_up_pvmove(struct cmd_context *cmd, const char *pv_name,
return_ECMD_FAILED;
}
+ if (!access_vg(cmd, vg)) {
+ unlock_and_release_vg(cmd, vg, vg->name);
+ return_ECMD_FAILED;
+ }
+
exclusive = _pvmove_is_exclusive(cmd, vg);
if ((lv_mirr = find_pvmove_lv(vg, pv_dev(pv), PVMOVE))) {