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
Alasdair G Kergon 4c2b4c37e7 lvmcache: Invalidate cached VG if PV is orphaned.
If a PV in an existing VG becomes orphaned (with 'pvcreate -ff', for
example) the VG struct cached against its vginfo must be invalidated.
This is because the struct device it references no longer contains
the PV label so becomes incorrect.

This triggers the error:
  Internal error: PV $dev unexpectedly not in cache.
when the PV from the cached VG metadata is subsequently looked up
in the cache.

Bug introduced in 2.02.87 by commit 7ad0d47c3c
("Cache and share generated VG structs").

Before:

lvm> pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/loop3 vg12 lvm2 a--  28.00m 28.00m
  /dev/loop4 vg12 lvm2 a--  28.00m 28.00m
lvm> pvcreate -ff /dev/loop3
Really INITIALIZE physical volume "/dev/loop3" of volume group "vg12" [y/n]? y
  WARNING: Forcing physical volume creation on /dev/loop3 of volume group "vg12"
  Physical volume "/dev/loop3" successfully created
lvm> pvs
  Internal error: PV /dev/loop3 unexpectedly not in cache.
  PV         VG   Fmt  Attr PSize  PFree
  /dev/loop3 vg12 lvm2 a--  28.00m 28.00m
  /dev/loop3      lvm2 a--  32.00m 32.00m
  /dev/loop4 vg12 lvm2 a--  28.00m 28.00m

After:
lvm> pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/loop3 vg12 lvm2 a--  28.00m 28.00m
  /dev/loop4 vg12 lvm2 a--  28.00m 28.00m
lvm> pvcreate -ff /dev/loop3
Really INITIALIZE physical volume "/dev/loop3" of volume group "vg12" [y/n]? y
  WARNING: Forcing physical volume creation on /dev/loop3 of volume group "vg12"
  Physical volume "/dev/loop3" successfully created
lvm> pvs
  PV             VG   Fmt  Attr PSize  PFree
  /dev/loop3          lvm2 a--  32.00m 32.00m
  /dev/loop4     vg12 lvm2 a--  28.00m 28.00m
  unknown device vg12 lvm2 a-m  28.00m 28.00m
2014-01-14 02:57:03 +00:00
autoconf Using Fedora 14's autoreconf. 2011-01-07 14:38:34 +00:00
conf conf: clarify wipe_signatures_when_zeroing_new_lvs 2013-12-10 10:16:37 +01:00
daemons lvmetad: Fix getting vgid_old & avoid removing in-transition VGs. 2014-01-08 15:22:24 +01:00
doc conf: add separate 'conf' dir for config files 2013-07-02 15:22:11 +02:00
include reporting: Add devtypes command. 2013-09-18 01:09:15 +01:00
lib lvmcache: Invalidate cached VG if PV is orphaned. 2014-01-14 02:57:03 +00:00
libdaemon lvmetad: extend socket/pid file handling 2013-11-29 20:56:29 +00:00
libdm libdm: pass dnode to callback 2014-01-08 11:57:43 +01:00
liblvm liblvm: mark constant as unsigned 2014-01-08 12:04:41 +01:00
man pvscan: use format feature flags in lvmetad code 2014-01-08 02:13:13 +00:00
old-tests Add .gitignore files for an in-source-tree build. 2012-06-08 16:26:21 +01:00
po INSTALL rules updates 2010-04-09 21:42:48 +00:00
python lvm2app: Reset buffer after retrieving error message 2013-11-19 14:40:42 -06: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 systemd: use only major:minor for pvscan in lvm2-pvscan@.service 2013-12-18 12:23:59 +01:00
test test: Increase the overall timeout to 3 hours. 2014-01-08 17:11:32 +01:00
tools reporter: Set labeller on dummy labels (fixes missing fmt field). 2014-01-13 11:45:38 +01:00
udev udev: fix SYSTEMD_READY assignment for foreign devices in lvmetad rules 2013-12-11 13:46:15 +01:00
unit-tests cleanup: replace memset with struct initilization 2012-06-22 13:23:03 +02:00
.gitignore gitignore: Ignore files ending in ~ 2012-06-11 16:13:02 +01:00
acinclude.m4 configure: also LDFLAGS, not LDLAGS for proper restore 2013-12-04 15:00:56 +01:00
aclocal.m4 configure: detect compiler flag 2013-10-25 00:41:36 +02:00
configure autoreconf: latest changes 2013-12-12 14:32:40 +01:00
configure.in configure: update recent change 2013-12-12 14:29:15 +01: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 compile/link: use RELRO/PIE compiler/linker options for executables 2013-12-05 14:03:10 +01:00
Makefile.in test: Turn check_full into check_system complementary with normal check. 2013-12-15 17:26:28 +01:00
README Rename git report from LVM2.git to lvm2.git. 2012-06-08 17:41:43 +01:00
VERSION post-release 2013-11-13 14:11:11 +00:00
VERSION_DM post-release 2013-11-13 14:11:11 +00:00
WHATS_NEW lvmcache: Invalidate cached VG if PV is orphaned. 2014-01-14 02:57:03 +00:00
WHATS_NEW_DM dmeventd: prevent busy looping on CPU 2013-12-12 13:40:55 +01: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/

The source code is stored in git:
  http://git.fedorahosted.org/git/lvm2.git
  git clone git://git.fedorahosted.org/git/lvm2.git

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

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

  lvm2-commits@lists.fedorahosted.org (Read-only archive of commits)
  Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits

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

The source code repository used until 7th June 2012 is accessible here:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.