Bug 1122847 - qemu-img convert doesn't print "No space left on device" strings error when the destination lv has no enough space
Summary: qemu-img convert doesn't print "No space left on device" strings error when t...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Max Reitz
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1122830
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-24 08:25 UTC by Sibiao Luo
Modified: 2014-07-25 03:24 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1122830
Environment:
Last Closed: 2014-07-24 23:12:10 UTC


Attachments (Terms of Use)

Comment 1 Sibiao Luo 2014-07-24 08:27:27 UTC
both kernel 2.6.32-448.el6.x86_64 and 2.6.32-492.el6.x86_64 can hit it.

Comment 2 Max Reitz 2014-07-24 23:12:10 UTC
See BZ 1122830 for a full description why this is not a bug (the volume being results in (nearly) no clusters being allocated in the qcow2 image, which makes it small enough to fit into the smaller volume; a non-zeroed source volume indeed results in the desired error message).

Comment 3 Sibiao Luo 2014-07-25 03:24:10 UTC
(In reply to Max Reitz from comment #2)
> See BZ 1122830 for a full description why this is not a bug (the volume
> being results in (nearly) no clusters being allocated in the qcow2 image,
> which makes it small enough to fit into the smaller volume; a non-zeroed
> source volume indeed results in the desired error message).
Thanks a lot.

# lvscan | grep /dev/vg/
  ACTIVE            '/dev/vg/lv1' [100.00 MiB] inherit
  ACTIVE            '/dev/vg/lv2' [20.00 MiB] inherit
# qemu-img create -f qcow2 /dev/vg/lv2 20M
Formatting '/dev/vg/lv2', fmt=qcow2 size=20971520 encryption=off cluster_size=65536 lazy_refcounts=off 
# qemu-img info /dev/vg/lv1
image: /dev/vg/lv1
file format: raw
virtual size: 100M (104857600 bytes)
disk size: 0
# qemu-img info /dev/vg/lv2
image: /dev/vg/lv2
file format: qcow2
virtual size: 20M (20971520 bytes)
disk size: 0
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
# dd if=/dev/urandom of=/dev/vg/lv1 bs=1M
dd: error writing ‘/dev/vg/lv1’: No space left on device
101+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 10.8566 s, 9.7 MB/s
# qemu-img convert -p -f raw -O qcow2 /dev/vg/lv1 /dev/vg/lv2
qemu-img: error while writing sector 36864: No space left on device

Best Regards,
sluo


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