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:
parent
87ec948433
commit
6e410af1d6
@ -1,3 +1,6 @@
|
|||||||
|
Version 2.02.41 -
|
||||||
|
=====================================
|
||||||
|
|
||||||
Version 2.02.40 - 19th September 2008
|
Version 2.02.40 - 19th September 2008
|
||||||
=====================================
|
=====================================
|
||||||
Allow lvremove to remove LVs from VGs with missing PVs.
|
Allow lvremove to remove LVs from VGs with missing PVs.
|
||||||
|
@ -141,8 +141,7 @@ static const char *decode_flags(unsigned char flags)
|
|||||||
{
|
{
|
||||||
static char buf[128];
|
static char buf[128];
|
||||||
|
|
||||||
sprintf(buf, "0x%x (%s%s%s)", flags,
|
sprintf(buf, "0x%x (%s%s)", flags,
|
||||||
flags & LCK_PARTIAL_MODE ? "PARTIAL " : "",
|
|
||||||
flags & LCK_MIRROR_NOSYNC_MODE ? "MIRROR_NOSYNC " : "",
|
flags & LCK_MIRROR_NOSYNC_MODE ? "MIRROR_NOSYNC " : "",
|
||||||
flags & LCK_DMEVENTD_MONITOR_MODE ? "DMEVENTD_MONITOR " : "");
|
flags & LCK_DMEVENTD_MONITOR_MODE ? "DMEVENTD_MONITOR " : "");
|
||||||
|
|
||||||
|
@ -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)
|
static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
|
||||||
{
|
{
|
||||||
|
struct list *pvh, *pvht;
|
||||||
struct list *lvh, *lvht;
|
struct list *lvh, *lvht;
|
||||||
|
struct pv_list *pvl;
|
||||||
struct lv_list *lvl, *lvl2, *lvlt;
|
struct lv_list *lvl, *lvl2, *lvlt;
|
||||||
struct logical_volume *lv;
|
struct logical_volume *lv;
|
||||||
struct physical_volume *pv;
|
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) */
|
/* FIXME Also check for segs on deleted LVs (incl pvmove) */
|
||||||
|
|
||||||
pv = seg_pv(seg, s);
|
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) &&
|
if (arg_count(cmd, mirrorsonly_ARG) &&
|
||||||
!(lv->status & MIRROR_IMAGE)) {
|
!(lv->status & MIRROR_IMAGE)) {
|
||||||
log_error("Non-mirror-image LV %s found: can't remove.", lv->name);
|
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;
|
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. */
|
/* FIXME Recovery. For now people must clean up by hand. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user