From: mbroz@sourceware.org <mbroz@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/metadata/metadata.c tools ...
Date: 29 Aug 2008 13:41:22 -0000 [thread overview]
Message-ID: <20080829134122.11013.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2008-08-29 13:41:21
Modified files:
. : WHATS_NEW
lib/metadata : metadata.c
tools : vgconvert.c
Log message:
Fix setting of volume limit count if converting to lvm1 format.
Fixes problem when after downconvert to lvm1 VG is broken:
# lvcreate -n lv1 -l 4 vg_test
Invalid LV in extent map (PV /dev/sdb1, PE 0, LV 0, LE 0)
...
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.949&r2=1.950
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.186&r2=1.187
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgconvert.c.diff?cvsroot=lvm2&r1=1.29&r2=1.30
--- LVM2/WHATS_NEW 2008/08/28 18:41:50 1.949
+++ LVM2/WHATS_NEW 2008/08/29 13:41:21 1.950
@@ -1,5 +1,6 @@
Version 2.02.40 -
================================
+ Fix setting of volume limit count if converting to lvm1 format.
Fix vgconvert logical volume id metadata validation.
Fix lvmdump metadata gather option (-m) to work correctly.
Fix allocation bug in text metadata format write error path.
--- LVM2/lib/metadata/metadata.c 2008/08/13 13:42:35 1.186
+++ LVM2/lib/metadata/metadata.c 2008/08/29 13:41:21 1.187
@@ -1255,6 +1255,13 @@
}
}
+ if (!(vg->fid->fmt->features & FMT_UNLIMITED_VOLS) &&
+ (!vg->max_lv || !vg->max_pv)) {
+ log_error("Internal error: Volume group %s has limited PV/LV count"
+ " but limit is not set.", vg->name);
+ r = 0;
+ }
+
return r;
}
--- LVM2/tools/vgconvert.c 2008/08/28 18:41:51 1.29
+++ LVM2/tools/vgconvert.c 2008/08/29 13:41:21 1.30
@@ -81,6 +81,15 @@
return ECMD_FAILED;
}
+ /* Set PV/LV limit if converting from unlimited metadata format */
+ if (vg->fid->fmt->features & FMT_UNLIMITED_VOLS &&
+ !(cmd->fmt->features & FMT_UNLIMITED_VOLS)) {
+ if (!vg->max_lv)
+ vg->max_lv = 255;
+ if (!vg->max_pv)
+ vg->max_pv = 255;
+ }
+
/* If converting to restricted lvid, check if lvid is compatible */
if (!(vg->fid->fmt->features & FMT_RESTRICTED_LVIDS) &&
cmd->fmt->features & FMT_RESTRICTED_LVIDS)
next reply other threads:[~2008-08-29 13:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 13:41 mbroz [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-07-24 15:01 LVM2 ./WHATS_NEW lib/metadata/metadata.c tools wysochanski
2010-12-22 15:36 zkabelac
2011-01-04 23:59 ` Alasdair G Kergon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080829134122.11013.qmail@sourceware.org \
--to=mbroz@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.