Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARSE attribute ignored on resize operation #6583

Open
3 tasks
Aletibazo opened this issue May 8, 2024 · 0 comments
Open
3 tasks

SPARSE attribute ignored on resize operation #6583

Aletibazo opened this issue May 8, 2024 · 0 comments

Comments

@Aletibazo
Copy link
Contributor

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.

  • Set SPARSE = NO on image Datastore
  • Create a new image on that image Datastore
  • Create a VM using the image, it should have the attribute SPARSE = NO
  • Resize disk after the image has been instantiated

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

  • Affected Component: [Storage Driver]
  • Hypervisor: [KVM]
  • Version: [6.4, 6.8, master]

Additional context
This issue is related to a previous issue (#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

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants