diff options
Diffstat (limited to 'tools/vgreduce.c')
-rw-r--r-- | tools/vgreduce.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 4c7e7f1a..16120fcd 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -532,21 +532,7 @@ int vgreduce(struct cmd_context *cmd, int argc, char **argv) log_print("Wrote out consistent volume group %s", vg_name); } else { - if (vg->status & EXPORTED_VG) { - log_error("Volume group \"%s\" is exported", vg->name); - unlock_vg(cmd, vg_name); - return ECMD_FAILED; - } - - if (!(vg->status & LVM_WRITE)) { - log_error("Volume group \"%s\" is read-only", vg_name); - unlock_vg(cmd, vg_name); - return ECMD_FAILED; - } - - if (!(vg->status & RESIZEABLE_VG)) { - log_error("Volume group \"%s\" is not reducible", - vg_name); + if (!vg_check_status(vg, EXPORTED_VG | LVM_WRITE | RESIZEABLE_VG)) { unlock_vg(cmd, vg_name); return ECMD_FAILED; } |