Bug 1303231 - qemu-img fails with glusterfs file smaller than 512 bytes
qemu-img fails with glusterfs file smaller than 512 bytes
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Fedora Virtualization Maintainers
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-01-29 16:43 EST by Tom Barron
Modified: 2016-12-12 15:44 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-12-12 15:44:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom Barron 2016-01-29 16:43:53 EST
Description of problem:

qemu-img info gluster://<file> fails when <file> is less than 512 bytes size

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

[root@localhost mnt]# rpm -q qemu-img
[root@localhost mnt]# rpm -q glusterfs-libs

How reproducible:


Steps to Reproduce:

1. Have a gluster server running on local node with one brick and zero replicas.
   Mount it to /mnt

2. Create file below 512 bytes and run qemu-image against it; observe failure; create at or above and observe success:
[root@localhost mnt]# pwd

[root@localhost mnt]# truncate -s 511 demofile; qemu-img info gluster://
qemu-img: Could not open 'gluster://': Could not read image for determining its format: Input/output error
[root@localhost mnt]# truncate -s 512 demofile; qemu-img info gluster://
image: gluster://
file format: raw
virtual size: 512 (512 bytes)
disk size: 0

Actual results:

Does not work below 512 bytes.

Expected results:

Same results for files below 512 bytes as at 512 bytes or higher.

Additional info:
Comment 1 Richard W.M. Jones 2016-01-29 16:53:32 EST
qemu has always had problems with small files like that.  In fact
libguestfs has to take special steps when you want to attach a
zero-sized drive, see:


It's worth noting that a file < 512 bytes in size probably cannot be
a valid filesystem (at least, for common file formats).  It's too small
to be a valid qcow2 file, and although it's valid for the raw format,
no real disk image could be less than 1 ordinary sector (512 bytes)
in size.  Maybe non-native formats like VMDK are different.
Comment 2 Richard W.M. Jones 2016-01-29 16:55:27 EST
> a valid filesystem (at least, for common file formats).

I mean disk image, not filesystem.
Comment 3 Fedora End Of Life 2016-11-24 10:16:41 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Cole Robinson 2016-12-12 15:44:37 EST
Not sure if this is still relevant for f24, but given the low impact of this, I don't think it's worth keeping it limping along in the fedora tracker. If anyone is still affected by this, please file an upstream bug, maybe one of the upstream devs will jump on it

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