summaryrefslogtreecommitdiffstats
path: root/daemons/dmeventd/plugins/mirror
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2009-06-15 14:47:39 +0000
committerPetr Rockai <prockai@redhat.com>2009-06-15 14:47:39 +0000
commit1f164ad9d060c43b21c34668664a504671fd7329 (patch)
tree9ac1f8d25fca75d23e2a8108cde05e152d698b5c /daemons/dmeventd/plugins/mirror
parent1bf740434accf20e66383b1ed842bd465ccfb2f5 (diff)
downloadlvm2-1f164ad9d060c43b21c34668664a504671fd7329.tar.gz
lvm2-1f164ad9d060c43b21c34668664a504671fd7329.tar.xz
lvm2-1f164ad9d060c43b21c34668664a504671fd7329.zip
- Ignore suspended devices during repair (Milan).
- Call vgreduce --removemissing (without --force) automatically to clean up bad PVs (Milan).
Diffstat (limited to 'daemons/dmeventd/plugins/mirror')
-rw-r--r--daemons/dmeventd/plugins/mirror/dmeventd_mirror.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
index 4c9fcf5c..ab7591d3 100644
--- a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
+++ b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
@@ -161,6 +161,12 @@ static int _remove_failed_devices(const char *device)
r = lvm2_run(_lvm_handle, cmd_str);
+ if (r == 1) {
+ snprintf(cmd_str, CMD_SIZE, "vgreduce --removemissing %s", vg);
+ if (lvm2_run(_lvm_handle, cmd_str) != 1)
+ syslog(LOG_ERR, "Unable to remove failed PVs from VG %s", vg);
+ }
+
dm_pool_empty(_mem_pool); /* FIXME: not safe with multiple threads */
return (r == 1) ? 0 : -1;
}