diff options
author | Milan Broz <mbroz@redhat.com> | 2012-03-23 16:28:40 +0000 |
---|---|---|
committer | Milan Broz <mbroz@redhat.com> | 2012-03-23 16:28:40 +0000 |
commit | 7076d1439b07aa697717d90aa01c62288fef2652 (patch) | |
tree | 249398282e96cbc108fc3ed7312b595b52b657c0 | |
parent | 2dba5632066ca05821567424d7b5d111a5c6eb11 (diff) | |
download | lvm2-7076d1439b07aa697717d90aa01c62288fef2652.tar.gz lvm2-7076d1439b07aa697717d90aa01c62288fef2652.tar.xz lvm2-7076d1439b07aa697717d90aa01c62288fef2652.zip |
Fix pvmove if LV is activated exclusively but cmirror is not running.
In this case we should allow to use local mirror, check for cmirror
should apply only for lvconvert/lvcreate.
Introduced in 2.02.86 by removing !(lv->status & ACTIVATE_EXCL).
(Partially workaround, it is minimalistic patch for now.)
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | lib/metadata/mirror.c | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,6 @@ Version 2.02.96 - ================================ + Fix pvmove for exclusively activated LV pvmove in clustered VG. (2.02.86) Always free hash table on update_pvid_to_vgid() in lvmetad. Update and fix monitoring of thin pool devices. Check hash insert success in lock_vg clvmd. diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index 45295049..236edea2 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -2070,7 +2070,10 @@ 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 */ - if (!_cluster_mirror_is_available(lv)) { + /* FIXME: move this test out of this function */ + /* Skip test for pvmove mirrors, it can use local mirror */ + if (!(lv->status & (PVMOVE | LOCKED)) && + !_cluster_mirror_is_available(lv)) { log_error("Shared cluster mirrors are not available."); return 0; } |