mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-21 22:04:19 +03:00
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 7ad0d47c3c93053c07c45161dbdbc0798ac7e2f6 ("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
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.
Description
Languages
C
75.5%
Shell
18.7%
Python
2.9%
M4
1%
Makefile
0.8%
Other
1%