summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-01-22 11:39:05 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2018-01-23 11:45:18 +0100
commit2ee105089a261f5db2ba8b93c30708ba66dd1a01 (patch)
treef7ef9fe39aeb90545696fc06b467e0c01ae8ee2b
parent9194610f42901c88a3393b679afabbdca7145268 (diff)
downloadlvm2-2ee105089a261f5db2ba8b93c30708ba66dd1a01.tar.gz
python: some LVs do need exclusive activation
-rw-r--r--liblvm/lvm_lv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/liblvm/lvm_lv.c b/liblvm/lvm_lv.c
index 20ceda30f..e5a35c4e9 100644
--- a/liblvm/lvm_lv.c
+++ b/liblvm/lvm_lv.c
@@ -304,7 +304,9 @@ static int _lvm_lv_activate(lv_t lv)
return -1;
}
- if (lv_is_origin(lv)) {
+ if (lv_is_origin(lv) ||
+ lv_is_pvmove(lv) ||
+ seg_only_exclusive(first_seg(lv))) {
log_verbose("Activating logical volume \"%s\" "
"exclusively", lv->name);
if (!activate_lv_excl(lv->vg->cmd, lv)) {