Comment 2 for bug 1847105

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

A quick check confirmed your report, thanks Andreas!

"preallocation" does exactly what expected and that takes the time you are seeing:
Preallocation mode (allowed values: "off", "falloc", "full"). "falloc" mode preallocates space for image by calling posix_fallocate(). "full" mode preallocates space for image by writing zeros to underlying storage.

It already uses fallocate which is better than writing zeros and much faster depending on the FS setup. But obviously bother are slower (on creation) than lazy allocation later.

The change of this should be in virt-manager, not libvirt I'd assume.
I'll take a look.

P.S. already ahead of time I'd think that creating with pre-alloc - while slower - is certainly much safer against later odd errors due to disk space.