summaryrefslogtreecommitdiffstats
path: root/tools/vgremove.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/vgremove.c')
-rw-r--r--tools/vgremove.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/vgremove.c b/tools/vgremove.c
index 1c5553de..7b85e207 100644
--- a/tools/vgremove.c
+++ b/tools/vgremove.c
@@ -23,8 +23,11 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name,
struct pv_list *pvl;
int ret = ECMD_PROCESSED;
- if (!vg || !consistent) {
- log_error("Volume group \"%s\" doesn't exist", vg_name);
+ if (!vg || !consistent || (vg->status & PARTIAL_VG)) {
+ log_error("Volume group \"%s\" not found or inconsistent.",
+ vg_name);
+ log_error("Consider vgreduce --removemissing if metadata "
+ "is inconsistent.");
return ECMD_FAILED;
}
@@ -33,12 +36,6 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name,
return ECMD_FAILED;
}
- if (vg->status & PARTIAL_VG) {
- log_error("Cannot remove partial volume group \"%s\"",
- vg->name);
- return ECMD_FAILED;
- }
-
if (vg->lv_count) {
log_error("Volume group \"%s\" still contains %d "
"logical volume(s)", vg_name, vg->lv_count);