Free disk space check (for raw image) ignores sparseness

Bug #1750515 reported by Ilya Etingof
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Triaged
Medium
Unassigned

Bug Description

Ironic uses qemu-img to convert this QCOW file to a "raw" image, which is a *sparse* file. Currently ironic-conductor errors out if local file system doesn't have enough free space to accommodate the *virtual* size of the image (which can span the entire storage device).

In fact, the actual disk space consumed by the sparse raw image is fairly close to the size of the QCOW file. For example:

$ qemu-img info overcloud-full-partitioned.qcow2
image: overcloud-full-partitioned.qcow2
file format: qcow2
virtual size: 100G (107374182400 bytes)
disk size: 7.0G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

$ qemu-img convert -O raw overcloud-full-partitioned.qcow2 overcloud-full-partitioned.img

$ ls -lh overcloud-full-partitioned.img
-rw-r--r--. 1 stack stack 100G Jan 17 14:13 overcloud-full-partitioned.img

$ du -h overcloud-full-partitioned.img
6.7G overcloud-full-partitioned.img

This bug is to make Ironic not requiring excessive space on its local file system for raw images.

Ilya Etingof (etingof)
Changed in ironic:
assignee: nobody → Ilya Etingof (etingof)
status: New → In Progress
Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → Medium
Dmitry Tantsur (divius)
Changed in ironic:
status: In Progress → Triaged
assignee: Ilya Etingof (etingof) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.