.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
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;
}
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);