summaryrefslogtreecommitdiffstats
path: root/daemons/dmeventd/plugins/mirror
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2009-05-19 10:25:16 +0000
committerMilan Broz <mbroz@redhat.com>2009-05-19 10:25:16 +0000
commitac0034c20fc346cf01f77f95e545f840b928be5c (patch)
tree3ee05b9873bd9a85f111ff4167f4193f4c0408b2 /daemons/dmeventd/plugins/mirror
parent94994d7e74a620042af41110cddd011bd70346c4 (diff)
downloadlvm2-ac0034c20fc346cf01f77f95e545f840b928be5c.tar.gz
lvm2-ac0034c20fc346cf01f77f95e545f840b928be5c.tar.xz
lvm2-ac0034c20fc346cf01f77f95e545f840b928be5c.zip
Use lvconvert --repair in dmeventd DSO (mornfall)
This means two things: 1) Non-mirrored LVs will be no longer affected by mirror monitoring. (Before, if you had a LV that went partially missing on a VG where a mirror leg failed, this LV would be removed automatically by dmeventd... Probably not an unrecoverable dataloss bug, but still quite unpleasant.) 2) If enough parallel PV space is available at the time of the mirror failure, the failed devices will be automatically replaced using this spare space. Which (and whether) free space may be used is still not configurable, but is a planned feature. Since it is relatively easy to undo the action by converting the mirror manually, I don't consider this to be a showstopper. In fact, I think the compromise is much better than what we have now.
Diffstat (limited to 'daemons/dmeventd/plugins/mirror')
-rw-r--r--daemons/dmeventd/plugins/mirror/dmeventd_mirror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
index fc610aea..9e89a553 100644
--- a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
+++ b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
@@ -152,7 +152,7 @@ static int _remove_failed_devices(const char *device)
}
/* FIXME Is any sanity-checking required on %s? */
- if (CMD_SIZE <= snprintf(cmd_str, CMD_SIZE, "vgreduce --config devices{ignore_suspended_devices=1} --removemissing --force %s", vg)) {
+ if (CMD_SIZE <= snprintf(cmd_str, CMD_SIZE, "lvconvert --config devices{ignore_suspended_devices=1} --repair %s/%s", vg, lv)) {
/* this error should be caught above, but doesn't hurt to check again */
syslog(LOG_ERR, "Unable to form LVM command: Device name too long");
dm_pool_empty(_mem_pool); /* FIXME: not safe with multiple threads */