From 550463b5e1c53f8894c98dce6ef8aa4763721b21 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Thu, 25 Sep 2008 15:52:29 +0000 Subject: [PATCH] Fix mirror DSO to call vgreduce with proper parameters. --- WHATS_NEW | 1 + daemons/dmeventd/plugins/mirror/dmeventd_mirror.c | 2 +- dmeventd/mirror/dmeventd_mirror.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 0a864e7a2..b46632db3 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.41 - ===================================== + Fix mirror DSO to call vgreduce with proper parameters. Fix validation of --minor and --major in lvcreate to require -My always. Fix release: clvmd build, vgreduce consolidate & tests, /dev/ioerror warning. diff --git a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c index 2d53d4f7a..fc610aea8 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 %s", vg)) { + if (CMD_SIZE <= snprintf(cmd_str, CMD_SIZE, "vgreduce --config devices{ignore_suspended_devices=1} --removemissing --force %s", vg)) { /* 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 */ diff --git a/dmeventd/mirror/dmeventd_mirror.c b/dmeventd/mirror/dmeventd_mirror.c index 2d53d4f7a..fc610aea8 100644 --- a/dmeventd/mirror/dmeventd_mirror.c +++ b/dmeventd/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 %s", vg)) { + if (CMD_SIZE <= snprintf(cmd_str, CMD_SIZE, "vgreduce --config devices{ignore_suspended_devices=1} --removemissing --force %s", vg)) { /* 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 */