Bug 248449 - snap creation on inactive lv causes an invaild and "100% full" snapshot
Summary: snap creation on inactive lv causes an invaild and "100% full" snapshot
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
(Show other bugs)
Version: 4.5
Hardware: All Linux
low
low
Target Milestone: ---
: ---
Assignee: Milan Broz
QA Contact: Corey Marthaler
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-16 20:33 UTC by Corey Marthaler
Modified: 2013-03-01 04:05 UTC (History)
6 users (show)

Fixed In Version: RHBA-2007-0753
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 15:58:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (979 bytes, patch)
2007-07-17 12:09 UTC, Milan Broz
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0753 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2007-11-14 16:56:08 UTC

Description Corey Marthaler 2007-07-16 20:33:58 UTC
Description of problem:
[root@link-02 mnt]# vgcreate vg /dev/sd*1
  Volume group "vg" successfully created
[root@link-02 mnt]# lvcreate -n origin -L 5G vg
  Logical volume "origin" created
[root@link-02 mnt]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 35.19G                               /dev/hda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/hda2(1126)
  origin   vg         -wi-a-  5.00G                               /dev/sda1(0)
[root@link-02 mnt]# lvcreate -s vg/origin -L 2G -n snap1
  Logical volume "snap1" created
[root@link-02 mnt]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 35.19G                               /dev/hda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/hda2(1126)
  origin   vg         owi-a-  5.00G                               /dev/sda1(0)
  snap1    vg         swi-a-  2.00G origin   0.00                 /dev/sda1(1280)
[root@link-02 mnt]# lvchange -an vg/origin
[root@link-02 mnt]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 35.19G                               /dev/hda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/hda2(1126)
  origin   vg         owi---  5.00G                               /dev/sda1(0)
  snap1    vg         swi---  2.00G origin                        /dev/sda1(1280)
[root@link-02 mnt]# vgsplit vg vg_newer /dev/sda1
  Volume group "vg_newer" successfully split from "vg"
[root@link-02 mnt]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 35.19G                               /dev/hda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/hda2(1126)
  origin   vg_newer   owi---  5.00G                               /dev/sda1(0)
  snap1    vg_newer   swi---  2.00G origin                        /dev/sda1(1280)
[root@link-02 mnt]# lvcreate -s vg_newer/origin -L 2G -n snap4
  Logical volume "snap4" created
[root@link-02 mnt]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 35.19G                               /dev/hda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/hda2(1126)
  origin   vg_newer   owi---  5.00G                               /dev/sda1(0)
  snap1    vg_newer   swi---  2.00G origin                        /dev/sda1(1280)
  snap4    vg_newer   Swi-I-  2.00G origin 100.00                 /dev/sda1(1792)

# Once it's re-activated, then it appears fine
[root@link-02 mnt]# lvchange -ay vg_newer/origin
[root@link-02 mnt]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 35.19G                               /dev/hda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/hda2(1126)
  origin   vg_newer   owi-a-  5.00G                               /dev/sda1(0)
  snap1    vg_newer   swi-a-  2.00G origin   0.00                 /dev/sda1(1280)
  snap4    vg_newer   swi-a-  2.00G origin   0.00                 /dev/sda1(1792)



Version-Release number of selected component (if applicable):
2.6.9-55.8.ELsmp
lvm2-2.02.21-5.el4

How reproducible:
everytime

Comment 1 Milan Broz 2007-07-17 09:37:56 UTC
Reproduced, this is not vgsplit problem, any snapshot creation on inactive
logical volume create this invalid entry.

Temporary workaround is to use vgchange -a y after split.

Comment 2 Milan Broz 2007-07-17 12:09:08 UTC
Created attachment 159417 [details]
Proposed patch

Proposed patch

Comment 3 RHEL Product and Program Management 2007-07-17 12:25:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Milan Broz 2007-07-17 16:15:57 UTC
Fixed upstream in 2.02.27, this is regression introduced in 2.02.13.

Comment 7 Corey Marthaler 2007-07-27 18:50:58 UTC
fix verified in lvm2-2.02.27-1.el4.

Comment 9 errata-xmlrpc 2007-11-15 15:58:54 UTC
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 the 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-2007-0753.html



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