From: mbroz@sourceware.org <mbroz@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/metadata/merge.c
Date: 9 Jun 2011 19:36:16 -0000 [thread overview]
Message-ID: <20110609193616.17425.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2011-06-09 19:36:16
Modified files:
. : WHATS_NEW
lib/metadata : merge.c
Log message:
Validate mirror segments size
Currently some operation with striped mirrors lead
to corrupted metadata, this patch just add detection of such
situation.
Example:
# lvcreate -i2 -l10 -n lvs vg_test
# lvconvert -m1 vg_test/lvs
# lvreduce -f -l1 vg_test/lvs
Reducing logical volume lvs to 4.00 MiB
Segment extent reduction 9not divisible by #stripes 2
Logical volume lvs successfully resized
# lvremove vg_test/lvs
Segment extent reduction 1not divisible by #stripes 2
LV segment lvs:0-4294967295 is incorrectly listed as being used by LV lvs_mimage_0
Internal error: LV segments corrupted in lvs_mimage_0.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2008&r2=1.2009
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44
--- LVM2/WHATS_NEW 2011/06/09 19:34:49 1.2008
+++ LVM2/WHATS_NEW 2011/06/09 19:36:16 1.2009
@@ -1,5 +1,6 @@
Version 2.02.86 -
=================================
+ Validate mirror segments size.
Fix extent rounding for striped volumes (never reduce more than requested).
Fix create_temp_name to replace any '/' found in the hostname with '?'.
Always use append to file in lvmdump (selinux policy - no file truncation).
--- LVM2/lib/metadata/merge.c 2010/05/21 12:43:02 1.43
+++ LVM2/lib/metadata/merge.c 2011/06/09 19:36:16 1.44
@@ -204,6 +204,16 @@
inc_error_count;
}
}
+
+ if (complete_vg && seg_is_mirrored(seg) &&
+ seg_type(seg, s) == AREA_LV &&
+ seg_lv(seg, s)->le_count != seg->area_len) {
+ log_error("LV %s: mirrored LV segment %u has "
+ "wrong size %u (should be %u).",
+ lv->name, s, seg_lv(seg, s)->le_count,
+ seg->area_len);
+ inc_error_count;
+ }
}
le += seg->len;
next reply other threads:[~2011-06-09 19:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 19:36 mbroz [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-02-22 13:22 LVM2 ./WHATS_NEW lib/metadata/merge.c agk
2008-01-26 0:30 agk
2007-07-10 18:50 agk
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=20110609193616.17425.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.