[PATCH 19/23] Replicator: activate change for vgchange

Zdenek Kabelac <[email protected]> Mon, 30 Nov 2009 12:37:19 +0100
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected]>
Activate only the first replicator-dev LV, that activates all other
related LVs from Replicator.

Signed-off-by: Zdenek Kabelac <[email protected]>
---
 tools/vgchange.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/vgchange.c b/tools/vgchange.c
index 3a4ceca..c224633 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -72,6 +72,10 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
 		if ((lv->status & MIRROR_IMAGE) || (lv->status & MIRROR_LOG))
 			continue;
 
+		/* Only request activation of the first replicator-dev LV */
+		if (lv_is_replicator_dev(lv) && (lv != first_replicator_dev(lv)))
+			continue;
+
 		/* Can't deactivate a pvmove LV */
 		/* FIXME There needs to be a controlled way of doing this */
 		if (((activate == CHANGE_AN) || (activate == CHANGE_ALN)) &&
-- 
1.6.5.3