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

fix last release

This commit is contained in:
Alasdair Kergon 2008-09-19 15:44:03 +00:00
parent 87ec948433
commit 6e410af1d6
4 changed files with 24 additions and 6 deletions

View File

@ -1 +1 @@
2.02.40-cvs (2008-09-18)
2.02.41-cvs (2008-09-19)

View File

@ -1,3 +1,6 @@
Version 2.02.41 -
=====================================
Version 2.02.40 - 19th September 2008
=====================================
Allow lvremove to remove LVs from VGs with missing PVs.

View File

@ -141,8 +141,7 @@ static const char *decode_flags(unsigned char flags)
{
static char buf[128];
sprintf(buf, "0x%x (%s%s%s)", flags,
flags & LCK_PARTIAL_MODE ? "PARTIAL " : "",
sprintf(buf, "0x%x (%s%s)", flags,
flags & LCK_MIRROR_NOSYNC_MODE ? "MIRROR_NOSYNC " : "",
flags & LCK_DMEVENTD_MONITOR_MODE ? "DMEVENTD_MONITOR " : "");

View File

@ -163,7 +163,9 @@ static int _consolidate_vg(struct cmd_context *cmd, struct volume_group *vg)
static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
{
struct list *pvh, *pvht;
struct list *lvh, *lvht;
struct pv_list *pvl;
struct lv_list *lvl, *lvl2, *lvlt;
struct logical_volume *lv;
struct physical_volume *pv;
@ -190,7 +192,8 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
/* FIXME Also check for segs on deleted LVs (incl pvmove) */
pv = seg_pv(seg, s);
if (!pv || !pv_dev(pv)) {
if (!pv || !pv_dev(pv) ||
(pv->status & MISSING_PV)) {
if (arg_count(cmd, mirrorsonly_ARG) &&
!(lv->status & MIRROR_IMAGE)) {
log_error("Non-mirror-image LV %s found: can't remove.", lv->name);
@ -211,8 +214,21 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
return 0;
}
if (!_consolidate_vg(cmd, vg))
return_0;
/*
* Remove missing PVs. FIXME: This duplicates _consolidate_vg above,
* but we cannot use that right now, since the LV removal code in this
* function leaves the VG in a "somewhat inconsistent" state and
* _consolidate_vg doesn't like that -- specifically, mirrors are fixed
* up *after* the PVs are removed. All this should be gradually
* superseded by lvconvert --repair.
*/
list_iterate_safe(pvh, pvht, &vg->pvs) {
pvl = list_item(pvh, struct pv_list);
if (pvl->pv->dev)
continue;
if (!_remove_pv(vg, pvl, 0))
return_0;
}
/* FIXME Recovery. For now people must clean up by hand. */