You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Image resize for fat type of disk does not preallocate additional space #10589
Currently (v.4.20.0.0) I see that sparse and fat disk types result in the same local disk format/size/type.
After digging into it I found the following flow for fat disks:
as a result new disk size is set to newsize, but its actual disk size is just of template_size
To be honest I see no reason to do create at all, it's overwritten by convert.
And to have fat newdisk there should be --preallocation=full in resize command too
This affects disk performance. In our CI environment CS disk becomes very fragmented, qemu-img map shows some 10K entries.
Also please consider using preallocated raw disks in place of preallocated qcow
Looks like preallocation for large disks makes significant load on cpu and may affect other VMs running
so worth doing nice -n 19 qemu-img
or even choose some less busy core and do nice -n 19 taskset -c $core qemu-img
Please consider using raw disks in place (or in addition to) qcow preallocated ones
@akrasnov-drv I've created PR #11986 to add preallocation for resize. The point regarding create not making any difference does make sense in cases, but right I'm not sure if tinkering with that may add some issues in any scenarios.
Activity
weizhouapache commentedon Mar 21, 2025
makes sense
added to 4.19.3 milestone. cc @Pearl1594
akrasnov-drv commentedon Mar 27, 2025
Looks like preallocation for large disks makes significant load on cpu and may affect other VMs running
so worth doing
nice -n 19 qemu-imgor even choose some less busy core and do
nice -n 19 taskset -c $core qemu-imgPlease consider using raw disks in place (or in addition to) qcow preallocated ones
akrasnov-drv commentedon Mar 27, 2025
If you just add preallocation then nothing should be changed in VM config
but if you want to replace qcow with raw, then indeed VM xml needs update
kvm: use preallocation option for fat disk resize
shwstppr commentedon Nov 6, 2025
@akrasnov-drv I've created PR #11986 to add preallocation for resize. The point regarding
createnot making any difference does make sense in cases, but right I'm not sure if tinkering with that may add some issues in any scenarios.kvm: use preallocation option for fat disk resize
DaanHoogland commentedon Dec 17, 2025
fixed in #11896