OpenNebula / one

The open source Cloud & Edge Computing Platform bringing real freedom to your Enterprise Cloud 🚀
http://opennebula.io
Apache License 2.0
1.19k stars 472 forks source link

SPARSE attribute ignored on resize operation #6583

Open Aletibazo opened 1 month ago

Aletibazo commented 1 month ago

Description The SPARSE attribute of a Datastore, inherited by images / disks, is ignored when running resize operations. This happens both for Local and NAS/SAN Datastore configurations (TM_MAD ssh or qcow2).

When attaching a disk with SPARSE = NO to a VM it successfully assigns all space to the created file, showing it on the monitor for that VM. If one where to resize that same disk, it will not use all additional assigned space on the filesystem, thus the disk size shown on the monitor for that VM would be the original size for the disk instead of the new size after the resize operation.

To Reproduce Steps to reproduce the behavior.

Expected behavior After the VM is intantiated and the disk attached to it is resized, the monitor for that VM should show that the disk is using all space assigned to it. Additionally, if one would check the size of the disk on the filesystem it should show that the file for that disk should be the size that was assigned to it on creation.

Details

Additional context This issue is related to a previous issue (https://github.com/OpenNebula/one/issues/6487) with the cloning script having the same behaviour. The resize operation should also be changed so it's consistent with how the SPARSE attribute works.

Progress Status