diff options
author | Alasdair Kergon <agk@redhat.com> | 2004-11-18 19:45:53 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2004-11-18 19:45:53 +0000 |
commit | c27dc4e75756ec7d2a97effe0e3aed5050c87176 (patch) | |
tree | 2fcf24565ce7bc5d625784d1145ae699f5dce8c7 /tools/vgremove.c | |
parent | ccce4dc0ee6ee932452cb93f59b430f734aacb7d (diff) | |
download | lvm2-c27dc4e75756ec7d2a97effe0e3aed5050c87176.tar.gz lvm2-c27dc4e75756ec7d2a97effe0e3aed5050c87176.tar.xz lvm2-c27dc4e75756ec7d2a97effe0e3aed5050c87176.zip |
Improve a vgremove error message.
Diffstat (limited to 'tools/vgremove.c')
-rw-r--r-- | tools/vgremove.c | 13 |
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); |