diff options
Diffstat (limited to 'tools/vgreduce.c')
-rw-r--r-- | tools/vgreduce.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 014d3379..1428a991 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -466,6 +466,7 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) int consistent = 1; int fixed = 1; int repairing = arg_count(cmd, removemissing_ARG); + int saved_ignore_suspended_devices = ignore_suspended_devices(); if (!argc && !repairing) { log_error("Please give volume group name and " @@ -515,6 +516,9 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) return ECMD_FAILED; } + if (repairing) + init_ignore_suspended_devices(1); + if ((!(vg = vg_read_internal(cmd, vg_name, NULL, &consistent)) || !consistent) && !repairing) { log_error("Volume group \"%s\" doesn't exist", vg_name); @@ -574,6 +578,7 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) } out: + init_ignore_suspended_devices(saved_ignore_suspended_devices); unlock_and_release_vg(cmd, vg, vg_name); return ret; |