Bug 244794 - deactivation of lv with snapshots may leave broken linked dev entries around
deactivation of lv with snapshots may leave broken linked dev entries around
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Milan Broz
Corey Marthaler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-19 04:34 EDT by Milan Broz
Modified: 2013-02-28 23:05 EST (History)
6 users (show)

See Also:
Fixed In Version: RHBA-2007-0516
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-07 11:49:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milan Broz 2007-06-19 04:34:25 EDT
+++ This bug was initially created as a clone of Bug #203037 +++
RHEL5 clone

Description of problem:
Here's the easiest way to reproduce this:
[root@taft-04 ~]# pvscan
  PV /dev/sdb1         lvm2 [136.23 GB]
  PV /dev/sdb2         lvm2 [136.23 GB]
  PV /dev/sdc1         lvm2 [136.23 GB]
  PV /dev/sdc2         lvm2 [136.23 GB]
  PV /dev/sdd1         lvm2 [930.89 GB]
  PV /dev/sdd2         lvm2 [930.89 GB]
  Total: 6 [2.35 TB] / in use: 0 [0   ] / in no VG: 6 [2.35 TB]

[root@taft-04 ~]# vgcreate vg /dev/sdb1 /dev/sdb2 /dev/sdc1 /dev/sdc2
  Volume group "vg" successfully created

[root@taft-04 ~]# lvcreate -n origin -L 100M vg
  Logical volume "origin" created

[root@taft-04 ~]# lvcreate -s /dev/vg/origin -L 10M -n snap
  Rounding up size to full physical extent 12.00 MB
  Logical volume "snap" created

[root@taft-04 ~]# lvchange -an /dev/vg/origin

[root@taft-04 ~]# lvscan
  inactive Original '/dev/vg/origin' [100.00 MB] inherit
  inactive Snapshot '/dev/vg/snap' [12.00 MB] inherit

[root@taft-04 ~]# pvscan
  PV /dev/sdb1   VG vg   lvm2 [136.23 GB / 136.13 GB free]
  PV /dev/sdb2   VG vg   lvm2 [136.23 GB / 136.22 GB free]
  PV /dev/sdc1   VG vg   lvm2 [136.23 GB / 136.23 GB free]
  PV /dev/sdc2   VG vg   lvm2 [136.23 GB / 136.23 GB free]
  PV /dev/sdd1           lvm2 [930.89 GB]
  PV /dev/sdd2           lvm2 [930.89 GB]
  Total: 6 [2.35 TB] / in use: 4 [544.92 GB] / in no VG: 2 [1.82 TB]

[root@taft-04 ~]# vgsplit vg new_vg /dev/sdb1 /dev/sdb2 /dev/sdc1 /dev/sdc2
  Volume group "new_vg" successfully split from "vg"

# Broken Link!
[root@taft-04 ~]# ls /dev/vg
snap

[root@taft-04 ~]# lvscan
  inactive Original '/dev/new_vg/origin' [100.00 MB] inherit
  inactive Snapshot '/dev/new_vg/snap' [12.00 MB] inherit


Version-Release number of selected component (if applicable):
[root@taft-04 ~]# rpm -q lvm2
lvm2-2.02.06-6.0.RHEL4

How reproducible:
everytime

-- Additional comment from mbroz@redhat.com on 2007-03-15 05:44 EST --
Correcting summary, problem is in deactivation of lv, not in vgsplit.

# lvcreate -n lv -L 100M vg_test
# lvcreate -s -n lv_snap -L 10M vg_test/lv
# lvchange -a n vg_test/lv
# ls -l /dev/vg_test/
total 0
lrwxrwxrwx 1 root root 27 Mar 14 15:13 lv_snap -> /dev/mapper/vg_test-lv_snap

-- Additional comment from mbroz@redhat.com on 2007-05-15 11:02 EST --
Fixed upstream in 2.02.26.
Comment 1 RHEL Product and Program Management 2007-06-19 04:44:32 EDT
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 3 Corey Marthaler 2007-06-27 18:12:41 EDT
fix verified in lvm2-2.02.26-1.el5.
Comment 5 errata-xmlrpc 2007-11-07 11:49:06 EST
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-0516.html

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