Bug 986573 - LVMError: lvdeactivate failed for root: running lvm lvchange -a n --config devices { filter=["r|/loop0$|","r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] } fedora/root failed
LVMError: lvdeactivate failed for root: running lvm lvchange -a n --config d...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
abrt_hash:7236d142ebe794544fa5b844f2d...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-20 16:03 EDT by benjamin.t.boyle
Modified: 2014-12-08 17:54 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-08 17:54:04 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)
File: anaconda-tb (95.61 KB, text/plain)
2013-07-20 16:03 EDT, benjamin.t.boyle
no flags Details
File: anaconda.log (2.68 KB, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: environ (2.11 KB, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: lsblk_output (898 bytes, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: nmcli_dev_list (12.29 KB, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: os_info (179 bytes, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: program.log (35.53 KB, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: storage.log (57.75 KB, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: ifcfg.log (2.13 KB, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
File: packaging.log (422 bytes, text/plain)
2013-07-20 16:04 EDT, benjamin.t.boyle
no flags Details
anaconda-tb-i5IArs (82.40 KB, text/plain)
2013-07-22 03:08 EDT, Steve Tyler
no flags Details

  None (edit)
Description benjamin.t.boyle 2013-07-20 16:03:51 EDT
Description of problem:
started anaconda

Version-Release number of selected component:
anaconda-19.30.13-1.fc19.x86_64

The following was filed automatically by anaconda:
anaconda 19.30.13-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/devicelibs/lvm.py", line 405, in lvdeactivate
    raise LVMError("lvdeactivate failed for %s: %s" % (lv_name, msg))
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 2635, in _teardown
    lvm.lvdeactivate(self.vg.name, self._name)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 760, in teardown
    self._teardown(recursive=recursive)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 2888, in findExistingInstallations
    device.teardown()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 424, in reset
    self.roots = findExistingInstallations(self.devicetree)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 144, in storageInitialize
    storage.reset()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 168, in run
    threading.Thread.run(self, *args, **kwargs)
LVMError: lvdeactivate failed for root: running lvm lvchange -a n --config  devices { filter=["r|/loop0$|","r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] }  fedora/root failed

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=/vmlinuz-3.9.9-302.fc19.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap rd.md=0 rd.dm=0 rd.luks=0 vconsole.keymap=us rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.9.9-302.fc19.x86_64
other involved packages: python-blivet-0.17-1.fc19.noarch, python-libs-2.7.5-3.fc19.x86_64
product:        Fedora
release:        Fedora release 19 (Schrödinger’s Cat)
type:           anaconda
version:        19
Comment 1 benjamin.t.boyle 2013-07-20 16:03:56 EDT
Created attachment 776227 [details]
File: anaconda-tb
Comment 2 benjamin.t.boyle 2013-07-20 16:04:00 EDT
Created attachment 776228 [details]
File: anaconda.log
Comment 3 benjamin.t.boyle 2013-07-20 16:04:03 EDT
Created attachment 776229 [details]
File: environ
Comment 4 benjamin.t.boyle 2013-07-20 16:04:06 EDT
Created attachment 776230 [details]
File: lsblk_output
Comment 5 benjamin.t.boyle 2013-07-20 16:04:10 EDT
Created attachment 776231 [details]
File: nmcli_dev_list
Comment 6 benjamin.t.boyle 2013-07-20 16:04:13 EDT
Created attachment 776232 [details]
File: os_info
Comment 7 benjamin.t.boyle 2013-07-20 16:04:17 EDT
Created attachment 776233 [details]
File: program.log
Comment 8 benjamin.t.boyle 2013-07-20 16:04:21 EDT
Created attachment 776234 [details]
File: storage.log
Comment 9 benjamin.t.boyle 2013-07-20 16:04:24 EDT
Created attachment 776235 [details]
File: ifcfg.log
Comment 10 benjamin.t.boyle 2013-07-20 16:04:27 EDT
Created attachment 776236 [details]
File: packaging.log
Comment 11 Steve Tyler 2013-07-20 16:37:28 EDT
How were you launching anaconda?

anaconda.log:
13:01:27,878 ERR anaconda.stdout: anaconda must be run as root.
13:01:40,682 INFO anaconda: /sbin/anaconda 19.30.13-1
...

program.log:
...
13:02:06,433 INFO program: Running... lvm lvchange -a n --config  devices { filter=["r|/loop0$|","r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] }  fedora/root
13:02:06,454 INFO program:   Logical volume fedora/root contains a filesystem in use.
13:02:06,454 DEBUG program: Return code: 5
...
Comment 12 Steve Tyler 2013-07-22 03:00:52 EDT
Reproduced in a VM by installing anaconda and running it from the command line:
$ sudo yum install anaconda
$ sudo anaconda

The guest is running an updated F19 Gnome desktop install with default partitioning.

anaconda 19.30.13-1

Tested with:
$ qemu-kvm -m 4096 -hda f19-test-1.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-DVD.iso -vga std -boot menu=on
Comment 13 Steve Tyler 2013-07-22 03:08:52 EDT
Created attachment 776761 [details]
anaconda-tb-i5IArs

anaconda 19.30.13-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/devicelibs/lvm.py", line 405, in lvdeactivate
    raise LVMError("lvdeactivate failed for %s: %s" % (lv_name, msg))
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 2635, in _teardown
    lvm.lvdeactivate(self.vg.name, self._name)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 760, in teardown
    self._teardown(recursive=recursive)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 2888, in findExistingInstallations
    device.teardown()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 424, in reset
    self.roots = findExistingInstallations(self.devicetree)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 144, in storageInitialize
    storage.reset()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 168, in run
    threading.Thread.run(self, *args, **kwargs)
LVMError: lvdeactivate failed for root: running lvm lvchange -a n --config  devices { filter=["r|/loop0$|","r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] }  fedora/root failed

Local variables in innermost frame:
msg: running lvm lvchange -a n --config  devices { filter=["r|/loop0$|","r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] }  fedora/root failed
args: ['lvchange', '-a', 'n', '--config', ' devices { filter=["r|/loop0$|","r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] } ', 'fedora/root']
vg_name: fedora
lv_name: root
Comment 14 David Lehman 2013-07-22 19:03:14 EDT
Running the 'anaconda' command from the command line is not supported. If you are running from live media you should run 'liveinst'. If you are doing an install to disk image files you should do the same. If you are trying to install an OS onto your system you should be booting from installation media -- not running anaconda from a shell prompt.
Comment 15 Steve Tyler 2013-07-22 21:40:55 EDT
Thanks, David.

This is not the first bug that has been reported against anaconda for failing when it is launched from the command line. If that is unsupported, the installer should say so and exit gracefully, instead of wasting everyone's time with specious bug reports.

What is confusing is that the anaconda command behaves like any other command in some ways:

$ which anaconda
/usr/sbin/anaconda

$ anaconda --version
Starting installer, one moment...
dm.c: 1693: not running as root returning empty list
anaconda 19.30.13-1

$ sudo anaconda --version
Starting installer, one moment...
anaconda 19.30.13-1

$ sudo anaconda --help
Starting installer, one moment...
Usage: anaconda [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -C, --cmdline         
...
  --leavebootorder      
  --noeject             
  --extlinux
Comment 16 Steve Tyler 2013-07-22 22:57:26 EDT
In Bug 896687, the reporter tried to launch anaconda from the command line.
Comment 17 Steve Tyler 2013-07-22 23:04:00 EDT
See also Bug 917160 -- the user tried to run anaconda "from the shell".
Comment 18 benjamin.t.boyle 2013-07-23 00:48:53 EDT
I did launch this from the command line.  As David points out, anaconda is not intended to run from the command line.  However, at the time I was not aware of this.  As Steve suggests, an error condition would have prevented me from reporting this issue, so it may be beneficial from a maintenance perspective to keep this bug or a related one to update the output.
Comment 19 Éloi Rivard 2013-09-24 10:05:51 EDT
I launched anaconda a first time, it has crashed during installation a first time. Then as soon as I re-launched it, it crashed again.

cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-osimg-min --lang fr_FR.utf8
cmdline_file:   initrd=initrd0.img root=live:CDLABEL=LIVE rootfstype=vfat ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0  BOOT_IMAGE=vmlinuz0 
hashmarkername: anaconda
kernel:         3.9.5-301.fc19.x86_64
other involved packages: python-blivet-0.17-1.fc19.noarch, python-libs-2.7.5-1.fc19.x86_64
package:        anaconda-19.30.13-1.fc19.x86_64
packaging.log:  
product:        Fedora
reason:         LVMError: lvdeactivate failed for root: running lvm lvchange -a n --config  devices { filter=["r|/loop5$|","r|/loop6$|","r|/loop7$|"] }  fedora_pc-eloi/root failed
release:        Fedora release 19 (Schrödinger’s Cat)
version:        19
Comment 20 David Shea 2014-12-08 17:54:04 EST
As noted in comment 14, running anaconda directly is not supported except in the cases of --dirinstall or --image. If run directly anaconda will attempt to access of your storage and it will fail because your storage is in use.

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