Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 633038

Summary: installation fails with LVMError: lvactivate failed for [chapter3_vorigin]: 14:42:32,169 ERROR : One or more specified logical volume(s) not found.
Product: Red Hat Enterprise Linux 6 Reporter: Adrien Kunysz <akunysz>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: agk, atodorov, bugproxy, iannis, msivak
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-13.21.89-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 12:50:10 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:
Attachments:
Description Flags
anaconda crash log generated at the time of the failure
none
sosreport of the RHEL5.5 system that is currently installed none

Description Adrien Kunysz 2010-09-12 15:06:04 UTC
Created attachment 446762 [details]
anaconda crash log generated at the time of the failure

Description of problem:

When attempting to install RHEL 6 beta 2 x86_64 from the DVD, anaconda crashes at the storage setup step.

Version-Release number of selected component (if applicable):

rhel6-beta2-server-x86_64.iso

How reproducible:

Always on that specific system (I suspect it's related to the LVM setup that is already on the disk).

Steps to Reproduce:
1. boot the ISO
2. choose the default option at every step
  
Actual results:

Anaconda crashes with the following backtrace (full log in attachment):

Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/devicelibs/lvm.py", line 406, in lvactivate
    raise LVMError("lvactivate failed for %s: %s" % (lv_name, msg))
  File "/usr/lib/anaconda/storage/devices.py", line 2260, in setup
    lvm.lvactivate(self.vg.name, self._name)
  File "/usr/lib/anaconda/storage/devicetree.py", line 1538, in handleUdevLVMPVFormat
    lv_device.setup()
  File "/usr/lib/anaconda/storage/devicetree.py", line 1783, in handleUdevDeviceFormat
    self.handleUdevLVMPVFormat(info, device)
  File "/usr/lib/anaconda/storage/devicetree.py", line 1282, in addUdevDevice
    self.handleUdevDeviceFormat(info, device)
  File "/usr/lib/anaconda/storage/devicetree.py", line 1926, in populate
    self.addUdevDevice(dev)
  File "/usr/lib/anaconda/storage/__init__.py", line 374, in reset
    self.devicetree.populate()
  File "/usr/lib/anaconda/storage/__init__.py", line 109, in storageInitialize
    storage.reset()
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/gui.py", line 1396, in setScreen
    self.anaconda.dispatch.gotoNext()
  File "/usr/lib/anaconda/gui.py", line 1309, in nextClicked
    self.setScreen ()
LVMError: lvactivate failed for [chapter3_vorigin]: 14:42:32,169 ERROR   :   One or more specified logical volume(s) not found.

Local variables in innermost frame:
msg: 14:42:32,169 ERROR   :   One or more specified logical volume(s) not found.
args: ['lvchange', '-a', 'y', 'myvg/[chapter3_vorigin]']
vg_name: myvg
lv_name: [chapter3_vorigin]


Expected results:

Whatever the content of the disk is, the installer shouldn't crash and should be able to offer the possibility of overwriting the full disk.

Additional info:

I'll try to get more details of what is on the disk at the moment.

Comment 3 Adrien Kunysz 2010-09-12 15:39:11 UTC
Created attachment 446769 [details]
sosreport of the RHEL5.5 system that is currently installed

It looks like the LV triggering the problem is a virtual(?) volume:

  LV                 VG   Attr   LSize  Origin             Snap%  Move Log Copy%  Convert Devices       
  chapter3           myvg swi---  4.00G [chapter3_vorigin]                                /dev/sda2(440)
  [chapter3_vorigin] myvg vwi--- 16.00T                                                                 
  exercise1          myvg -wi-a-  4.00G                                                   /dev/sda2(312)
  rootvol            myvg -wi-ao  9.75G                                                   /dev/sda2(0)  

Attached is the sosreport of the system that is currently installed on the disk.

Comment 4 Adrien Kunysz 2010-09-13 13:00:29 UTC
Detailed steps to reproduce the problem on that system:
1) boot on the DVD
2) Choose to install
3) Choose English
4) Choose UK keyboard
5) choose to install from local CD/DVD
6) skip media check
7) next
8) Install anyway
9) choose basic storage devices
10) click next and Anaconda will crash at this point

The way I would resolve that is to wrap storage/devicetree.py:populate():1918-1947 in a try/catch and run something like _handleInconsistencies afterwards but you might also want to deal with this specific case at the LVM level.

Comment 5 Dave Cantrell 2010-09-13 20:02:56 UTC
*** Bug 633399 has been marked as a duplicate of this bug. ***

Comment 6 David Lehman 2010-11-17 18:14:45 UTC
I've committed a patch (commit a697b2cdf6bb2b907efcf16afb3d21f8507e21eb) to the upstream anaconda git repository to add support for detecting vorigin snapshot volumes. All that's needed is to pull it over for RHEL.

Comment 7 RHEL Program Management 2010-11-17 18:19:31 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 8 Alexander Todorov 2010-12-01 21:42:46 UTC
qa_ack+ but I'd like to get some more clarification about the reproducer.

Adrien
from the lvs man page I read:

The lv_attr bits are:
1  Volume type: (m)irrored, (M)irrored without initial sync, (o)rigin, (O)rigin  with  merging  snapshot,  (s)napshot,  merging  (S)napshot,
                 (p)vmove, (v)irtual,


So chapter3 is a snapshot of [chapter3_vorigin], which has volume type "virtual". How do you create such volume and why it wasn't active ?

Comment 9 David Lehman 2010-12-01 22:11:56 UTC
(In reply to comment #8)
> So chapter3 is a snapshot of [chapter3_vorigin], which has volume type
> "virtual". How do you create such volume and why it wasn't active ?

From 'man lvcreate':

  --virtualsize VirtualSize
    Create a sparse device of the given  size  (in  MB  by  default)
    using  a  snapshot.   Anything  written  to  the  device will be
    returned when reading from it.  Reading from other areas of  the
    device will return blocks of zeros.  It is implemented by creat-
    ing a hidden virtual device of the requested size using the zero
    target.  A suffix of _vorigin is used for this device.

...and...

  "lvcreate --virtualsize 1T --size 100M --snapshot --name sparse vg1"
  creates  a  sparse  device named /dev/vg1/sparse of size 1TB with space
  for just under 100MB of actual data on it.



The chapter3_vorigin device is not a real device, and so is never active as I understand it.

Comment 10 Alexander Todorov 2010-12-02 08:50:51 UTC
Thanks for the explanation Dave. 

QE note: So to reproduce we need to do:

1) lvcreate --virtualsize 1T --size 100M --snapshot --name sparse vg1
2) This will create the "sparse" and "sparse_vorigin" volumes as described in man page
3) Initiate a second install on the same system and select default options.

Comment 12 David Lehman 2011-01-20 02:39:49 UTC
A fix for this bug will be included in the next anaconda build, which I believe will be anaconda-13.21.89-1.

Comment 14 Alexander Todorov 2011-04-04 14:03:46 UTC
Tested with snap #2 and steps to reproduce from comment #10. On the second install anaconda didn't crash.

Comment 15 errata-xmlrpc 2011-05-19 12:50:10 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 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-2011-0530.html