Environment
-
AOS Version: 6.8.8
-
Hypervisor: AHV 2022.10
-
CVM: Nutanix CVM version 5.18.3
-
VM Guest OS: Ubuntu 20.04 LTS
-
Storage Type: vDisk attached as AHV data disk
Description
When I create a new vDisk, write data to it, and then delete the vDisk in Prism, the underlying storage space is not reclaimed immediately. I still see the same physical usage reported in Prism Element and on the CVM filesystem, even after:
-
Deleting all snapshots and clones
-
Running
fstrim -v /mountpoint
inside the VM -
Executing the Reclaim Space action in Prism
-
Triggering a manual Curator scan (
curator_cli scan start
)
I expect the deleted blocks to be freed right away, but they remain allocated for hours or even days.
Steps to Reproduce
-
In Prism Element, create a new 50 GB vDisk and attach it to a running VM.
-
Inside the VM, format and mount the vDisk:
mkfs.ext4 /dev/nvme1n1
mount /dev/nvme1n1 /mnt/testdisk -
Write 20 GB of test data copying from windows os disk
-
Unmount and delete the vDisk in Prism.
-
Observe that the used capacity in Prism Element under Storage > Logical Usage vs Physical Usage remains unchanged.
What I've Tried
-
Verified no snapshots or clones exist for the VM/vDisk
-
Ran
fstrim
inside the guest OS -
Used the Reclaim Space feature in Prism
-
Triggered
curator_cli scan start
on the CVM -
Checked CVM storage paths (
du -sh /home/nutanix/data/stargate-storage/*
)
Expected Result
Deleted vDisk blocks should be reclaimed immediately (or within minutes), reducing physical usage on the cluster.
Actual Result
Physical usage remains constant; freed blocks are not reclaimed until much later (hours to days).
Request for Help
- Has anyone experienced similar behavior or found a reliable method to force immediate space reclamation? Are there any additional CLI commands, configuration settings, or best practices I’m missing? Any guidance would be greatly appreciated.
Also i would not like to go and run command from cvm everytime, i want to use API endpoints to do all above step using postman.
- Create a VM
- Create and attach disk to VM
- Write data to disk
- Delete disk , as there is no option to detach disk in nutanix
- Check for space
- I need to do this in parallel 30 threads
That would mean everyday 30 X 50 GB space would be created and filled and needs to cleanup immediately.
Thank you!
Hilam