Bug 501390 - Partial mode is broken for lvm1 PVs
Summary: Partial mode is broken for lvm1 PVs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Milan Broz
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-18 21:12 UTC by Milan Broz
Modified: 2013-03-01 04:07 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-19 23:25:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milan Broz 2009-05-18 21:12:57 UTC
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.)

Comment 3 Milan Broz 2010-07-07 11:45:47 UTC
upstream RFC patch is here, waiting fo some review...
https://www.redhat.com/archives/lvm-devel/2010-June/msg00166.html

Comment 4 Milan Broz 2011-01-19 23:25:59 UTC
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.