Bug 888118

Summary: error creating partitions on LVM volume created with allocation=0
Product: Red Hat Enterprise Linux 6 Reporter: tingting zheng <tzheng>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, berrange, clalancette, crobinso, dyasny, dyuan, eblake, g.kaviyarasu, itamar, jforbes, jonathan, joshua, jyang, laine, libvirt-maint, mzhan, pschindl, rwu, tflink, tzheng, vanmeeuwen+fedora, veillard, virt-maint, whuang, yupzhang, zpeng
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:074ffa47cecf899c64c8e31eced4f2397fa7a7028c7cbe2a13b09816c3da9ad0
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 872162 Environment:
Last Closed: 2013-02-25 14:10:07 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:
Bug Depends On: 872162    
Bug Blocks:    

Description tingting zheng 2012-12-18 02:31:36 UTC
The issue also exists on rhel6.4,as suggested by developer,cloned the bug to rhel.
version:
libvirt-0.10.2-12.el6.x86_64

# virsh vol-create-as --pool lvm sparsetest --capacity 16M --allocation 0
error: Failed to create vol sparsetest
error: internal error Child process (/sbin/lvchange -aln vgtest/sparsetest) unexpected exit status 5:   One or more specified logical volume(s) not found.

+++ This bug was initially created as a clone of Bug #872162 +++

Description of problem:
I created a new LVM partition (I let allocation on 0) with virt-manager wizzard and choose it for virtual machine. I let anaconda to use the whole disk. When anaconda tried to create partitions it falls.

My guess is, that it is fault of libvirt and it is somehow related to bug 866481 



Version-Release number of selected component:
anaconda-18.21

Additional info:
libreport version: 2.0.17
cmdline:        /usr/bin/python  /sbin/anaconda
kernel:         3.6.2-2.fc18.x86_64

description:
:The following was filed automatically by anaconda:
:anaconda 18.21 exception report
:Traceback (most recent call first):
:  File "/usr/lib64/python2.7/site-packages/parted/disk.py", line 221, in commitToDevice
:    return self.__disk.commit_to_dev()
:  File "/usr/lib64/python2.7/site-packages/parted/decorators.py", line 32, in new
:    ret = fn(*args, **kwds)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/disklabel.py", line 300, in commitToDisk
:    self.partedDisk.commitToDevice()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/deviceaction.py", line 436, in execute
:    self.device.disk.format.commitToDisk()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 323, in processActions
:    action.execute()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 357, in doIt
:    self.devicetree.processActions()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 195, in turnOnFilesystems
:    storage.doIt()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 107, in doInstall
:    turnOnFilesystems(storage)
:  File "/usr/lib64/python2.7/threading.py", line 504, in run
:    self.__target(*self.__args, **self.__kwargs)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 91, in run
:    threading.Thread.run(self, *args, **kwargs)
:IOException: Input/output error during write on /dev/vda

--- Additional comment from Petr Schindler on 2012-11-01 08:37:06 EDT ---

Created attachment 636640 [details]
File: anaconda-tb

--- Additional comment from Petr Schindler on 2012-11-01 08:37:08 EDT ---

Created attachment 636641 [details]
File: product

--- Additional comment from Petr Schindler on 2012-11-01 08:37:11 EDT ---

Created attachment 636642 [details]
File: type

--- Additional comment from Petr Schindler on 2012-11-01 08:37:14 EDT ---

Created attachment 636643 [details]
File: ifcfg.log

--- Additional comment from Petr Schindler on 2012-11-01 08:37:16 EDT ---

Created attachment 636644 [details]
File: storage.log

--- Additional comment from Petr Schindler on 2012-11-01 08:37:18 EDT ---

Created attachment 636645 [details]
File: version

--- Additional comment from Petr Schindler on 2012-11-01 08:37:21 EDT ---

Created attachment 636646 [details]
File: environ

--- Additional comment from Petr Schindler on 2012-11-01 08:37:23 EDT ---

Created attachment 636647 [details]
File: executable

--- Additional comment from Petr Schindler on 2012-11-01 08:37:25 EDT ---

Created attachment 636648 [details]
File: anaconda.log

--- Additional comment from Petr Schindler on 2012-11-01 08:37:28 EDT ---

Created attachment 636649 [details]
File: syslog

--- Additional comment from Petr Schindler on 2012-11-01 08:37:30 EDT ---

Created attachment 636650 [details]
File: hashmarkername

--- Additional comment from Petr Schindler on 2012-11-01 08:37:32 EDT ---

Created attachment 636651 [details]
File: packaging.log

--- Additional comment from Petr Schindler on 2012-11-01 08:37:36 EDT ---

Created attachment 636652 [details]
File: cmdline_file

--- Additional comment from Petr Schindler on 2012-11-01 08:37:39 EDT ---

Created attachment 636653 [details]
File: release

--- Additional comment from Petr Schindler on 2012-11-01 08:37:41 EDT ---

Created attachment 636654 [details]
File: program.log

--- Additional comment from Petr Schindler on 2012-11-01 08:44:29 EDT ---

Created attachment 636667 [details]
Output from 'lvs'

This could be a hint.

--- Additional comment from Tim Flink on 2012-12-13 04:47:53 EST ---

This bug has been proposed as NTH for Fedora 18 final. If accepted as NTH, a fix for this would be considered for pushing to stable past the change freeze. More details about the NTH process is available at http://fedoraproject.org/wiki/QA:SOP_nth_bug_process .

Since there are so may NTH bugs to review, we'd like to find out if there is developer support for accepting this as NTH. If accepted as NTH, would a fix likely be ready in time to be included in Fedora 18 (currently scheduled for 2013-01-08)?

Developers, please respond soon as we will be using these responses to prioritize the order in which we review the proposed NTH bugs.

--- Additional comment from Eric Blake on 2012-12-13 11:58:10 EST ---

Looks like this commit already addressed the issue:
commit 9f0e9cba27b3e2b8409f2ce1c0ed4d24d677be9b
Author: Cole Robinson <crobinso>
Date:   Tue Oct 16 20:30:23 2012 -0400

    On F17 at least, this command fails:
    
    $ sudo /usr/sbin/lvcreate --name sparsetest -L 0K --virtualsize 16384K vgvirt
      Unable to create new logical volume with no extents
    
    Which is unfortunate since allocation=0 is what virt-manager tries to use
    by default.
    
    Rather than telling the user 'don't do that', let's just give them the
    smallest allocation possible if alloc=0 is requested.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=866481

--- Additional comment from Eric Blake on 2012-12-13 11:59:15 EST ---



*** This bug has been marked as a duplicate of bug 866481 ***

--- Additional comment from Eric Blake on 2012-12-13 12:01:36 EST ---

Or is this a followon issue, only made manifest by the fix for 866481, and we need to reopen this to figure out what further changes need to be made?

--- Additional comment from Cole Robinson on 2012-12-13 12:02:52 EST ---

Reopening, this is actually a different issue.

Before, trying to do allocation=0 with libvirt would fail at volume creation time. The commit referened in comment #18 changed that to not fail, but the volume is not usable inside the guest, anaconda errors out. So something else is going on here.

--- Additional comment from tingting zheng on 2012-12-17 03:30:09 EST ---

Hi cole,
   This issue also exists on rhel6.4,when I use virt-manager to create a default volume in lvm pool,error occurs:libvirtError: internal error Child process (/usr/sbin/lvchange -aln vg_data/newlv) unexpected exit status 5:   One or more specified logical volume(s) not found.
   Is it necessary to clone this bug to rhel6.4 to track this issue?thanks.

--- Additional comment from Cole Robinson on 2012-12-17 13:23:38 EST ---

(In reply to comment #22)
> Hi cole,
>    This issue also exists on rhel6.4,when I use virt-manager to create a
> default volume in lvm pool,error occurs:libvirtError: internal error Child
> process (/usr/sbin/lvchange -aln vg_data/newlv) unexpected exit status 5:  
> One or more specified logical volume(s) not found.
>    Is it necessary to clone this bug to rhel6.4 to track this issue?thanks.

Yes, please file a separate bug for RHEL

Comment 1 Jiri Denemark 2013-02-25 14:10:07 UTC

*** This bug has been marked as a duplicate of bug 912179 ***