Description of problem: qemu-img info gluster://192.168.124.79/volume1/<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 qemu-img-2.4.1-6.fc23.x86_64 [root@localhost mnt]# rpm -q glusterfs-libs glusterfs-libs-3.7.6-2.fc23.x86_64 How reproducible: 100% 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 /mnt [root@localhost mnt]# truncate -s 511 demofile; qemu-img info gluster://192.168.124.79/volume1/demofile qemu-img: Could not open 'gluster://192.168.124.79/volume1/demofile': Could not read image for determining its format: Input/output error [root@localhost mnt]# truncate -s 512 demofile; qemu-img info gluster://192.168.124.79/volume1/demofile image: gluster://192.168.124.79/volume1/demofile 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:
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: https://github.com/libguestfs/libguestfs/blob/master/src/drives.c#L391-L428 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.
> a valid filesystem (at least, for common file formats). I mean disk image, not filesystem.
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.
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