]> sourceware.org Git - lvm2.git/commitdiff
Improve a vgremove error message.
authorAlasdair Kergon <agk@redhat.com>
Thu, 18 Nov 2004 19:45:53 +0000 (19:45 +0000)
committerAlasdair Kergon <agk@redhat.com>
Thu, 18 Nov 2004 19:45:53 +0000 (19:45 +0000)
man/vgremove.8
tools/vgremove.c

index 997b90f195c27464790848c08c9cf0dff95f9895..0f2d9e9fe5b2c91fb9c5d7a9cea1e4d9dc733b2a 100644 (file)
@@ -8,7 +8,10 @@ VolumeGroupName [VolumeGroupName...]
 .SH DESCRIPTION
 vgremove allows you to remove one or more volume groups.
 The volume group(s) must not have any logical volumes allocated:
-Remove them first with \fBlvremove\fP.
+Remove them first with \fBlvremove\fP. If one or more physical
+volumes in the volume group are lost, consider 
+\fBvgreduce --removemissing\fP to make the volume group
+metadata consistent again.
 .SH OPTIONS
 See \fBlvm\fP for common options.
 .SH SEE ALSO
index 1c5553de42e582492560ccb52f69b52d393beee1..7b85e2078bb9b146832582ff0647c8ca54f9bbca 100644 (file)
@@ -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);
This page took 0.041992 seconds and 5 git commands to generate.