From 1f164ad9d060c43b21c34668664a504671fd7329 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Mon, 15 Jun 2009 14:47:39 +0000 Subject: - Ignore suspended devices during repair (Milan). - Call vgreduce --removemissing (without --force) automatically to clean up bad PVs (Milan). --- daemons/dmeventd/plugins/mirror/dmeventd_mirror.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'daemons/dmeventd/plugins/mirror') 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; } -- cgit