summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2013-05-31 19:10:07 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2013-05-31 21:42:31 +0200
commit31f3274ed8a81cbf6c25c7bc6307e58894f436a9 (patch)
tree6bda96a40a6930eb860c24d2dd7f17a60cbbefca
parente5baaf4ac9f2de39558b23606432ebeed483c99a (diff)
downloadlvm2-31f3274ed8a81cbf6c25c7bc6307e58894f436a9.tar.gz
mirror: implement check for remotely active LV
If the mirror is active exclusively and locally, then we may proceed.
-rw-r--r--lib/metadata/mirror.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index f23bee35f..f4f7b66b0 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -2065,10 +2065,11 @@ int lv_add_mirrors(struct cmd_context *cmd, struct logical_volume *lv,
}
if (vg_is_clustered(lv->vg)) {
- /* FIXME: review check of lv_is_active_remotely */
/* FIXME: move this test out of this function */
/* Skip test for pvmove mirrors, it can use local mirror */
if (!(lv->status & (PVMOVE | LOCKED)) &&
+ lv_is_active(lv) &&
+ !lv_is_active_exclusive_locally(lv) && /* lv_is_active_remotely */
!_cluster_mirror_is_available(lv)) {
log_error("Shared cluster mirrors are not available.");
return 0;