diff options
Diffstat (limited to 'daemons/dmeventd/plugins/mirror')
-rw-r--r-- | daemons/dmeventd/plugins/mirror/dmeventd_mirror.c | 6 |
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; } |