Bug 803724 - [RFE] [vdsm] No metadata reservation for qcow2 when importing from RAW file image
[RFE] [vdsm] No metadata reservation for qcow2 when importing from RAW file i...
Status: CLOSED DUPLICATE of bug 1053746
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity high
: ---
: 3.5.0
Assigned To: Allon Mureinik
yeylon@redhat.com
storage
: FutureFeature, Improvement, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-15 10:11 EDT by Jakub Libosvar
Modified: 2016-04-18 03:02 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-10 06:48:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
vdsm.log (279.41 KB, text/x-log)
2012-03-15 10:11 EDT, Jakub Libosvar
no flags Details

  None (edit)
Description Jakub Libosvar 2012-03-15 10:11:24 EDT
Created attachment 570303 [details]
vdsm.log

Description of problem:
When importing VM that has RAW disk on NFS export domain to iSCSI and image is converted to qcow2, qemu-img convert fails due to insufficient space on created LV for the image - the LV has the same size as source file has. I was told it should have reserved some extra space for qcow2 metadata (see bug 803344)

Version-Release number of selected component (if applicable):
vdsm-4.9-112.8.el6_2.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Have a VM on NFS export domain with RAW image
2. Try to import the VM with checked Collapse snapshot and select Thin provision for the image.
  
Actual results:
Import fails

Expected results:
Import succeeds and imported VM is preallocated

Additional info:
9270ac81-1221-472c-b16d-f72153017510::DEBUG::2012-03-15 15:03:37,045::lvm::374::Storage.Misc.excCmd::(cmd) '/usr/bin/sudo -n /sbin/lvm lvcreate --config " devices { preferred_names = [\\"^/dev/mapper/\\"] ignore_suspended_devices=1 write_cache_state=0 disable_after_error_count=3 filter = [ \\"a%1jlibosva|1jlibosva2%\\", \\"r%.*%\\" ] }  global {  locking_type=1  prioritise_write_locks=1  wait_for_locks=1 }  backup {  retain_min = 50  retain_days = 0 } " --autobackup n --contiguous n --size 1024m --name fee665ad-65e1-4b3b-a562-a4a941169480 2a8b4e96-e616-4960-9cc8-f381e433571d' (cwd None)
9270ac81-1221-472c-b16d-f72153017510::DEBUG::2012-03-15 15:03:37,332::volume::867::Storage.Misc.excCmd::(createVolume) u'/usr/bin/qemu-img create -f qcow2 /rhev/data-center/7c66f1fb-6e13-4148-b38b-63f62a3ac7ef/2a8b4e96-e616-4960-9cc8-f381e433571d/images/9a897b7c-b324-45f2-b935-2085b374746b/fee665ad-65e1-4b3b-a562-a4a941169480 10240K' (cwd None)
9270ac81-1221-472c-b16d-f72153017510::DEBUG::2012-03-15 15:03:37,497::lvm::374::Storage.Misc.excCmd::(cmd) '/usr/bin/sudo -n /sbin/lvm lvchange --config " devices { preferred_names = [\\"^/dev/mapper/\\"] ignore_suspended_devices=1 write_cache_state=0 disable_after_error_count=3 filter = [ \\"a%1jlibosva|1jlibosva2%\\", \\"r%.*%\\" ] }  global {  locking_type=1  prioritise_write_locks=1  wait_for_locks=1 }  backup {  retain_min = 50  retain_days = 0 } " --autobackup n --addtag MD_4 --addtag PU_00000000-0000-0000-0000-000000000000 --addtag IU_9a897b7c-b324-45f2-b935-2085b374746b 2a8b4e96-e616-4960-9cc8-f381e433571d/fee665ad-65e1-4b3b-a562-a4a941169480' (cwd None)
9270ac81-1221-472c-b16d-f72153017510::DEBUG::2012-03-15 15:03:37,935::lvm::374::Storage.Misc.excCmd::(cmd) '/usr/bin/sudo -n /sbin/lvm lvextend --config " devices { preferred_names = [\\"^/dev/mapper/\\"] ignore_suspended_devices=1 write_cache_state=0 disable_after_error_count=3 filter = [ \\"a%1jlibosva|1jlibosva2%\\", \\"r%.*%\\" ] }  global {  locking_type=1  prioritise_write_locks=1  wait_for_locks=1 }  backup {  retain_min = 50  retain_days = 0 } " --autobackup n --size 2048m 2a8b4e96-e616-4960-9cc8-f381e433571d/fee665ad-65e1-4b3b-a562-a4a941169480' (cwd None)
9270ac81-1221-472c-b16d-f72153017510::DEBUG::2012-03-15 15:03:39,055::volume::935::Storage.Misc.excCmd::(qemuConvert) u'/bin/nice -n 19 /usr/bin/ionice -c 2 -n 7 /usr/bin/qemu-img convert -t none -f raw /rhev/data-center/7c66f1fb-6e13-4148-b38b-63f62a3ac7ef/dece16d0-39ab-49be-aee6-00b1323bf0f4/images/9a897b7c-b324-45f2-b935-2085b374746b/fee665ad-65e1-4b3b-a562-a4a941169480 -O qcow2 /rhev/data-center/7c66f1fb-6e13-4148-b38b-63f62a3ac7ef/2a8b4e96-e616-4960-9cc8-f381e433571d/images/9a897b7c-b324-45f2-b935-2085b374746b/fee665ad-65e1-4b3b-a562-a4a941169480' (cwd None)
9270ac81-1221-472c-b16d-f72153017510::DEBUG::2012-03-15 15:04:11,204::volume::935::Storage.Misc.excCmd::(qemuConvert) FAILED: <err> = ['qemu-img: error while writing']; <rc> = 1
9270ac81-1221-472c-b16d-f72153017510::DEBUG::2012-03-15 15:04:11,205::volume::937::Storage.Volume::(qemuConvert) (qemuConvert): COPY /rhev/data-center/7c66f1fb-6e13-4148-b38b-63f62a3ac7ef/dece16d0-39ab-49be-aee6-00b1323bf0f4/images/9a897b7c-b324-45f2-b935-2085b374746b/fee665ad-65e1-4b3b-a562-a4a941169480 to /rhev/data-center/7c66f1fb-6e13-4148-b38b-63f62a3ac7ef/2a8b4e96-e616-4960-9cc8-f381e433571d/images/9a897b7c-b324-45f2-b935-2085b374746b/fee665ad-65e1-4b3b-a562-a4a941169480 DONE
9270ac81-1221-472c-b16d-f72153017510::ERROR::2012-03-15 15:04:11,206::image::813::Storage.Image::(copy) Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/image.py", line 803, in copy
    raise se.CopyImageError(str(e))
CopyImageError: low level Image copy failed: ('General Storage Exception: ("rc: 1, err: [\'qemu-img: error while writing\']",)',)
Comment 2 RHEL Product and Program Management 2012-05-04 00:08:45 EDT
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Comment 3 RHEL Product and Program Management 2012-07-10 04:55:27 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 4 RHEL Product and Program Management 2012-07-10 21:55:12 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 5 RHEL Product and Program Management 2012-12-14 02:59:19 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 7 Maor 2013-03-28 09:38:09 EDT
(In reply to comment #6)
> didn't you addressed it already?

I think that the issue you refer to, was to verify enough space when removing a snapshot.
If this is the case then this is a different issue, in this case there should be a different validation at the CDA phase.
I think that we should calculate getSize which is the virtual size for each disk instead getActualSize.
Also verify it for importing a template
Comment 10 Allon Mureinik 2014-08-10 06:48:18 EDT
This should be as part of bug 1053746, closing.

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

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