summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-10-09 12:20:47 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2012-10-09 12:22:26 +0200
commitcdb7502e54aeb464216af271289deec12f15442e (patch)
tree109956d062484dc6e50b2ed7b9110168e1b4ecba /tools
parentd414fe28fa1754690e8c72a16df5c2cdc1cc87e1 (diff)
downloadlvm2-cdb7502e54aeb464216af271289deec12f15442e.tar.gz
lvm2-cdb7502e54aeb464216af271289deec12f15442e.tar.xz
lvm2-cdb7502e54aeb464216af271289deec12f15442e.zip
lvchange: do not start dmevent for resyn
If monitoring is disabled in lvm.conf, avoid its starting and preserve DMEVENTD_MONITOR_IGNORE settings internally.
Diffstat (limited to 'tools')
-rw-r--r--tools/lvchange.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index b2c1fe4a..35256170 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -370,7 +370,8 @@ static int lvchange_resync(struct cmd_context *cmd,
/* Activate exclusively to ensure no nodes still have LV active */
monitored = dmeventd_monitor_mode();
- init_dmeventd_monitor(0);
+ if (monitored != DMEVENTD_MONITOR_IGNORE)
+ init_dmeventd_monitor(0);
if (!deactivate_lv(cmd, lv)) {
log_error("Unable to deactivate %s for resync", lv->name);
@@ -383,7 +384,8 @@ static int lvchange_resync(struct cmd_context *cmd,
return 0;
}
- init_dmeventd_monitor(monitored);
+ if (monitored != DMEVENTD_MONITOR_IGNORE)
+ init_dmeventd_monitor(monitored);
init_mirror_in_sync(0);
log_very_verbose("Starting resync of %s%s%s%s \"%s\"",