Bug 209927
Summary: | Creating a LVM snapshot destroys volume group metadata | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Tomas Edwardsson <tommi> |
Component: | lvm2 | Assignee: | Alasdair Kergon <agk> |
Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 4.4 | CC: | agk, dwysocha, heinzm, mbroz |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | RHBA-2008-0776 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-07-24 20:07:13 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tomas Edwardsson
2006-10-08 12:56:08 UTC
Reproduced, will see what can be done about it. This request was previously evaluated by Red Hat Product Management for inclusion in the current Red Hat Enterprise Linux release, but Red Hat was unable to resolve it in time. This request will be reviewed for a future Red Hat Enterprise Linux release. Since LVM1 metadata can be converted to LVM2 easily *and* this is about creating new snapshots on LVM1 volume groups, I would propose a simple measure of disallowing such action. The tools somehow manage to corrupt the LVM1 metadata in nontrivial way, and I suppose it is not worth the debugging trouble. LVM1 metadata is definitely deprecated and the only viable usecase is maintaining a system compatible with RHEL3, which together with necessity to create new snapshots is niche at best. The patch for such a solution should be straightforward. I'm adding that to my TODO and will propose such a patch shortly. I've just tried this: Invalid LV in extent map (PV /var/tmp/test2, PE 1, LV 1, LE 0) Couldn't fill logical volume maps. Let's at least understand why it goes wrong to make sure there's nothing more fundamental we need to fix. Indeed there is an underlying bug here: the internal variable vg->lv_count is not maintained consistently throughout the code, leading to this bug. One line fix in 2.02.36, to remember to include snapshots when writing the number of LVs in the VG into the on-disk metadata. Also fixed related problem of lvremove also getting the number of LVs wrong. To clarify - this is a bug affecting the manipulation of metadata stored on-disk in the old format used by LVM1. It should not affect data stored within any LVs. Metadata stored on-disk using the default LVM2 format is unaffected. To see which format you are using, run: vgs -o +vg_fmt Fix verified in lvm2-2.02.37-3.el4. [root@taft-03 ~]# vgs -o +vg_fmt VG #PV #LV #SN Attr VSize VFree Fmt VolGroup00 1 2 0 wz--n- 68.12G 32.00M lvm2 taft 3 0 0 wz--n- 406.98G 406.98G lvm1 [root@taft-03 ~]# lvcreate -L 1G -n origin taft Logical volume "origin" created [root@taft-03 ~]# lvcreate -s taft/origin -L 100M -n snap Logical volume "snap" created [root@taft-03 ~]# lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices LogVol00 VolGroup00 -wi-ao 58.34G /dev/sda2(0) LogVol01 VolGroup00 -wi-ao 9.75G /dev/sda2(1867) origin taft own-a- 1.00G /dev/sdb1(0) snap taft swn-a- 100.00M origin 0.01 /dev/sdc1(0) An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0776.html |