1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Jonathan Earl Brassow da23255cc9 Fix for bug 732142: Unsafe table load during mirror image split
There was a bad sequence:
*) Make changes to LV layout to split images (e.g. 4-way -> 2-way/2-way)
1) vg_write, suspend_lv(original_mirror), vg_commit
2) activate_lv(newly_split_lv)
3) resume_lv(original_mirror)

Step #2 is not allowed.  However, without it, the resume of the original
mirror will also resume its former sub-LVs - making it impossible to
activate the newly split LV due to the changes in layering, pointers, and
names that had already been made.  Additionally, the resume or the original
brings the sub-lv's online with names that differ from the metadata on disk -
also a no-no.  Thus, the split must be done in stages such that the active LVs
always reflect what is in the committed LVM metadata.

First, alter the original mirror by releasing the images.  The images are made
visible and independent as an intermediate stage.  (This way, we can have
consistency between LVM metadata and active LVs.)  The second stage collects
the recently split LVs, deactivates them, forms them into a mirror if necessary,
and then activates them.  It is a bit of a circuitous method, but it is the only
way to split a mirror from a mirror and obey these general rules:
1) Never [de]activate sub-lvs when the top-level LV is suspended
2) Avoid having active LVs that differ from the description in the LVM metadata

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2011-09-01 19:22:11 +00:00
autoconf Using Fedora 14's autoreconf. 2011-01-07 14:38:34 +00:00
daemons Only build libdaemon.a when we need it at the moment. 2011-09-01 17:56:53 +00:00
doc more pre-release fixes 2011-08-12 02:16:46 +00:00
include Refactor the percent (mirror sync, snapshot usage) handling code to use 2010-11-30 11:53:31 +00:00
lib Fix for bug 732142: Unsafe table load during mirror image split 2011-09-01 19:22:11 +00:00
libdm Add comments & remove always-included header. 2011-09-01 17:58:27 +00:00
liblvm Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
man tweak split/track/merge 2011-08-19 17:36:13 +00:00
old-tests Move tests from old-tests/regex to unit-tests/regex. unit-tests will 2010-07-20 15:18:57 +00:00
po INSTALL rules updates 2010-04-09 21:42:48 +00:00
report-generators add copyright notices to new files 2010-07-28 12:20:38 +00:00
reports [REPORT-GENERATORS] cut down stylsheet.css to what we actually use 2010-07-21 10:00:38 +00:00
scripts Suppress locking error messages in monitoring init scripts. 2011-08-11 15:27:46 +00:00
test Do not call prepare_lvmetad just yet in tests. 2011-08-31 12:42:55 +00:00
tools Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
udev Update udev rules to skip DM flags decoding for removed devices 2011-08-11 17:55:29 +00:00
unit-tests [MM] Make valgrind aware of the pool allocators 2010-08-09 10:56:01 +00:00
aclocal.m4 Add aclocal.m4 (for pkgconfig). 2011-01-07 16:27:05 +00:00
configure Autoreconf for lvmetad patch 2011-08-31 11:39:32 +00:00
configure.in A compromise integration of LVMetaD into the build: I have kept all the 2011-08-31 11:31:57 +00:00
COPYING Outline docs 2001-12-31 16:12:40 +00:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in core removed with clean not distclean 2011-08-12 12:56:38 +00:00
Makefile.in pre-release fixes incl make distclean and configure --with-raid=none/shared 2011-08-11 19:18:17 +00:00
README quick review of docs 2008-11-04 17:49:22 +00:00
VERSION post-release 2011-08-19 19:42:39 +00:00
VERSION_DM post-release 2011-08-19 19:42:39 +00:00
WHATS_NEW Fix for bug 732142: Unsafe table load during mirror image split 2011-09-01 19:22:11 +00:00
WHATS_NEW_DM Mark unreleased memory pools as internal error 2011-09-01 10:19:01 +00:00

This tree contains the LVM2 and device-mapper tools and libraries.

For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.

There is no warranty - see COPYING and COPYING.LIB.

Tarballs are available from:
  ftp://sources.redhat.com/pub/lvm2/

To access the CVS tree use:
  cvs -d :pserver:cvs@sources.redhat.com:/cvs/lvm2 login
  CVS password: cvs
  cvs -d :pserver:cvs@sources.redhat.com:/cvs/lvm2 co LVM2

Mailing list for general discussion related to LVM2:
  linux-lvm@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing list for LVM2 development, patches and commits:
  lvm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing list for device-mapper development, including kernel patches
and multipath-tools:
  dm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel