Description of problem: The partial mode is broken if PV is missing, partial mode is requested and PV are lvm1 format. # 1) prepare not active lvm1 VG: # pvcreate -M1 /dev/sd[bcfg] Physical volume "/dev/sdb" successfully created Physical volume "/dev/sdc" successfully created Physical volume "/dev/sdf" successfully created Physical volume "/dev/sdg" successfully created # vgcreate -M1 vg_test /dev/sd[bcfg] Volume group "vg_test" successfully created # lvcreate -l1 -n lv vg_test Logical volume "lv" created # vgchange -a n 0 logical volume(s) in volume group "vg_test" now active # 2) destroy one of PVs # pvcreate -ff /dev/sdc Really INITIALIZE physical volume "/dev/sdc" of volume group "vg_test" [y/n]? y WARNING: Forcing physical volume creation on /dev/sdc of volume group "vg_test" Physical volume "/dev/sdc" successfully created # 3) Try to backup VG in partial mode # vgcfgbackup -f bck -P vg_test Partial mode. Incomplete volume groups will be activated read-only. 3 PV(s) found for VG vg_test: expected 4 PV segment VG free_count mismatch: 152599 != 228909 PV segment VG extent_count mismatch: 152600 != 228910 Internal error: PV segments corrupted in vg_test. Volume group "vg_test" not found Version-Release number of selected component (if applicable): # lvm version LVM version: 2.02.40-RHEL5 (2008-10-24) Library version: 1.02.28 (2008-09-18) Driver version: 4.11.5 # rpm -q lvm2 lvm2-2.02.40-6.el5.x86_64 (This is broken in all rhel5 lvm2 versions.)
upstream RFC patch is here, waiting fo some review... https://www.redhat.com/archives/lvm-devel/2010-June/msg00166.html
Partial fix for this problem is already in RHEL5.6 release. There is still issue in some situationsm though. But because it requires quite amount of time to fix it properly and this situation is very rare (and simple command for updating metadata to lvm2 format exists) I am closing this.