Bug 501390 - Partial mode is broken for lvm1 PVs
Partial mode is broken for lvm1 PVs
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Milan Broz
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2009-05-18 17:12 EDT by Milan Broz
Modified: 2013-02-28 23:07 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-01-19 18:25:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Milan Broz 2009-05-18 17:12:57 EDT
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

(This is broken in all rhel5 lvm2 versions.)
Comment 3 Milan Broz 2010-07-07 07:45:47 EDT
upstream RFC patch is here, waiting fo some review...
Comment 4 Milan Broz 2011-01-19 18:25:59 EST
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.

Note You need to log in before you can comment on or make changes to this bug.