public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/metadata/merge.c
@ 2011-06-09 19:36 mbroz
0 siblings, 0 replies; 4+ messages in thread
From: mbroz @ 2011-06-09 19:36 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW lib/metadata/merge.c
@ 2008-02-22 13:22 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2008-02-22 13:22 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-02-22 13:22:45
Modified files:
. : WHATS_NEW
lib/metadata : merge.c
Log message:
Fix remove_layer_from_lv to empty the LV before removing it. (2.02.30)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.796&r2=1.797
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.34&r2=1.35
--- LVM2/WHATS_NEW 2008/02/22 13:22:19 1.796
+++ LVM2/WHATS_NEW 2008/02/22 13:22:44 1.797
@@ -1,5 +1,6 @@
Version 2.02.34 -
===================================
+ Fix remove_layer_from_lv to empty the LV before removing it. (2.02.30)
Add missing no-longer-used segs_using_this_lv test to check_lv_segments.
Remove redundant non-NULL tests before calling free in clvmd.c.
Avoid a compiler warning: make is_orphan's parameter const.
--- LVM2/lib/metadata/merge.c 2008/01/30 14:00:00 1.34
+++ LVM2/lib/metadata/merge.c 2008/02/22 13:22:44 1.35
@@ -224,6 +224,20 @@
seg->le + seg->len - 1, seg_found);
r = 0;
}
+
+ seg_found = 0;
+ list_iterate_items(seg2, &seg->lv->segments)
+ if (sl->seg == seg2) {
+ seg_found++;
+ break;
+ }
+ if (!seg_found) {
+ log_error("LV segment %s:%" PRIu32 "-%" PRIu32
+ "is incorrectly listed as being used by LV %s",
+ seg->lv->name, seg->le, seg->le + seg->len - 1,
+ lv->name);
+ r = 0;
+ }
}
if (le != lv->le_count) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW lib/metadata/merge.c
@ 2008-01-26 0:30 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2008-01-26 0:30 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-01-26 00:30:33
Modified files:
. : WHATS_NEW
lib/metadata : merge.c
Log message:
Fix two check_lv_segments error messages to show whole segment.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.778&r2=1.779
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.31&r2=1.32
--- LVM2/WHATS_NEW 2008/01/26 00:25:04 1.778
+++ LVM2/WHATS_NEW 2008/01/26 00:30:28 1.779
@@ -1,5 +1,6 @@
Version 2.02.32 -
===================================
+ Fix two check_lv_segments error messages to show whole segment.
Refactor mirror log attachment code.
Fix internal metadata corruption in lvchange --resync. (2.02.30)
Fix new parameter validation in vgsplit and test mode. (2.02.30)
--- LVM2/lib/metadata/merge.c 2008/01/16 19:00:59 1.31
+++ LVM2/lib/metadata/merge.c 2008/01/26 00:30:28 1.32
@@ -210,17 +210,18 @@
if (seg->log_lv == lv)
seg_found++;
if (!seg_found) {
- log_error("LV %s is used by LV %s:%" PRIu32 ", "
- "but missing ptr from %s to %s",
+ log_error("LV %s is used by LV %s:%" PRIu32 "-%" PRIu32
+ ", but missing ptr from %s to %s",
lv->name, seg->lv->name, seg->le,
+ seg->le + seg->len - 1,
seg->lv->name, lv->name);
r = 0;
} else if (seg_found != sl->count) {
log_error("Reference count mismatch: LV %s has %d "
- "links to LV %s:%" PRIu32
+ "links to LV %s:%" PRIu32 "-%" PRIu32
", which has %d links",
- lv->name, sl->count,
- seg->lv->name, seg->le, seg_found);
+ lv->name, sl->count, seg->lv->name, seg->le,
+ seg->le + seg->len - 1, seg_found);
r = 0;
}
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* LVM2 ./WHATS_NEW lib/metadata/merge.c
@ 2007-07-10 18:50 agk
0 siblings, 0 replies; 4+ messages in thread
From: agk @ 2007-07-10 18:50 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2007-07-10 18:50:03
Modified files:
. : WHATS_NEW
lib/metadata : merge.c
Log message:
Cope with find_seg_by_le() failure in check_lv_segments().
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.650&r2=1.651
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.27&r2=1.28
--- LVM2/WHATS_NEW 2007/07/10 17:51:26 1.650
+++ LVM2/WHATS_NEW 2007/07/10 18:50:02 1.651
@@ -1,5 +1,6 @@
Version 2.02.27 -
================================
+ Cope with find_seg_by_le() failure in check_lv_segments().
Call dev_iter_destroy() if _process_all_devs() is interrupted by sigint.
Add vg_mda_count and pv_mda_count columns to reports.
Fix dumpconfig to use log_print instead of stdout directly.
--- LVM2/lib/metadata/merge.c 2005/10/28 12:48:50 1.27
+++ LVM2/lib/metadata/merge.c 2007/07/10 18:50:03 1.28
@@ -146,9 +146,9 @@
if (complete_vg && seg_lv(seg, s) &&
(seg_lv(seg, s)->status & MIRROR_IMAGE) &&
- (find_seg_by_le(seg_lv(seg, s),
- seg_le(seg, s))->mirror_seg
- != seg)) {
+ (!(seg2 = find_seg_by_le(seg_lv(seg, s),
+ seg_le(seg, s))) ||
+ seg2->mirror_seg != seg)) {
log_error("LV %s: segment %u mirror "
"image %u missing mirror ptr",
lv->name, seg_count, s);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-09 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 19:36 LVM2 ./WHATS_NEW lib/metadata/merge.c mbroz
-- strict thread matches above, loose matches on Subject: below --
2008-02-22 13:22 agk
2008-01-26 0:30 agk
2007-07-10 18:50 agk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).