Bug 884621 - Creating snapshot of inactive LV fails: One or more specified logical volume(s) not found.
Creating snapshot of inactive LV fails: One or more specified logical volume(...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.4
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Peter Rajnoha
Cluster QE
: Regression
Depends On:
Blocks: 888457
  Show dependency treegraph
 
Reported: 2012-12-06 07:51 EST by Marian Csontos
Modified: 2013-02-21 03:15 EST (History)
11 users (show)

See Also:
Fixed In Version: lvm2-2.02.98-5.el6
Doc Type: Bug Fix
Doc Text:
This bug was introduced between releases and never appeared in an actual LVM release, RHEL or otherwise. No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:15:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Marian Csontos 2012-12-06 07:51:41 EST
Description of problem:

Caused by commit bf274137 - Use lv_is_active instead of lv_info() - the refactored code is not equivalent to original and function fails when LV is inactive instead of setting variable to 0.

This was fixed by commit 400f6442861.

This is covered by STS and (modified) unit tests.

Version-Release number of selected component (if applicable):
lvm2-2.02.98-4.el6

How reproducible:
100%

Steps to Reproduce:

> #!/bin/bash
> VG=vg
> lvcreate -L 300M $VG -n origin
> lvchange -an $VG/origin
> lvcreate -s /dev/$VG/origin -c 32 -n snap_of_inactive -L 100M
  
Actual results:
snapshot fails with following message:
> One or more specified logical volume(s) not found.

Expected results:
operation should succeed

Additional info:
Comment 3 Nenad Peric 2012-12-18 09:13:29 EST
(08:13:41) [root@r6-node01:~]$ lvcreate -L 300M $VG -n origin
  Logical volume "origin" created
(08:13:42) [root@r6-node01:~]$ lvchange -an $VG/origin
(08:13:43) [root@r6-node01:~]$ lvcreate -s /dev/$VG/origin -c 32 -n snap_of_inactive -L 100M
  Logical volume "snap_of_inactive" created
(08:13:56) [root@r6-node01:~]$ lvcreate -s /dev/$VG/origin -c 32 -n snap_of_inactive2 -L 100M
  Logical volume "snap_of_inactive2" created


(08:14:51) [root@r6-node01:~]$ lvs
  LV                VG       Attr      LSize   Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_root           VolGroup -wi-ao---   7.54g                                             
  lv_swap           VolGroup -wi-ao---   1.97g                                             
  origin            vg       owi---s-- 300.00m                                             
  snap_of_inactive  vg       swi---s-- 100.00m      origin                                 
  snap_of_inactive2 vg       swi---s-- 100.00m      origin                       

Marking verified with:

lvm2-2.02.98-6.el6.x86_64
lvm2-cluster-2.02.98-6.el6.x86_64
cmirror-2.02.98-6.el6.x86_64
device-mapper-1.02.77-6.el6.x86_64
Comment 4 errata-xmlrpc 2013-02-21 03:15:12 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0501.html

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