1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Missing check for inconsistent VG in pvmove.

This commit is contained in:
Alasdair Kergon 2003-08-18 13:52:43 +00:00
parent 5518374bd9
commit 28cb0299c1

View File

@ -182,7 +182,7 @@ static struct list *_get_allocatable_pvs(struct cmd_context *cmd, int argc,
pvl = list_item(pvh, struct pv_list);
if ((pvl->pv->dev == pv->dev) ||
(pvl->pv->pe_count == pvl->pv->pe_alloc_count))
list_del(&pvl->list);
list_del(&pvl->list);
}
if (list_empty(allocatable_pvs)) {
@ -576,6 +576,17 @@ static int _poll_pvmove_vgs(struct cmd_context *cmd, const char *vgname,
struct physical_volume *pv;
int finished;
if (!vg) {
log_error("Couldn't read volume group %s", vgname);
return ECMD_FAILED;
}
if (!consistent) {
log_error("Volume Group %s inconsistent - skipping", vgname);
/* FIXME Should we silently recover it here or not? */
return ECMD_FAILED;
}
if (vg->status & EXPORTED_VG) {
log_error("Volume group \"%s\" is exported", vg->name);
return ECMD_FAILED;