summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-06-29 10:18:28 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2012-08-23 14:38:48 +0200
commit5d0e7fb4edbe2c4e999eaa6210b6c9e25bdd5e91 (patch)
tree09655c75c3186c4974277f6a35d32f1c6e2f5eef
parent57c0f72b1d0349382c226c2b5614489b59db99e8 (diff)
downloadlvm2-5d0e7fb4edbe2c4e999eaa6210b6c9e25bdd5e91.zip
lvm2-5d0e7fb4edbe2c4e999eaa6210b6c9e25bdd5e91.tar.gz
lvm2-5d0e7fb4edbe2c4e999eaa6210b6c9e25bdd5e91.tar.xz
activation: report error message
If the monitoring activation failed and we have not yet reported error - give the user error message for failure reason.
-rw-r--r--lib/activate/activate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 512adcf..185ba5f 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1391,6 +1391,9 @@ int monitor_dev_for_events(struct cmd_context *cmd, struct logical_volume *lv,
r = (monitored && monitor) || (!monitored && !monitor);
}
+ if (!r && !error_message_produced())
+ log_error("%sonitoring %s/%s failed.", monitor ? "M" : "Not m",
+ lv->vg->name, lv->name);
return r;
#else
return 1;