diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2012-10-09 12:20:47 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2012-10-09 12:22:26 +0200 |
commit | cdb7502e54aeb464216af271289deec12f15442e (patch) | |
tree | 109956d062484dc6e50b2ed7b9110168e1b4ecba /tools | |
parent | d414fe28fa1754690e8c72a16df5c2cdc1cc87e1 (diff) | |
download | lvm2-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.c | 6 |
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\"", |