Repository navigation
Incorrect Disk usage is reported when using Ceph erasure code pool #13718
Description
Activity
- changed the title
[-]Incorrect Disk usage is reported when a Ceph storage[/-][+]Incorrect Disk usage is reported when using Ceph erasure code pool[/+]on Jul 27, 2026 Based on the discussion in
CloudStack gets the used bytes information from libvirt.
root@Cloudstack-Kvm-Host3:/home/ubuntu# virsh pool-info 15e9a03c-6eb1-3d3c-8cac-5918f0c75f0f Name: 15e9a03c-6eb1-3d3c-8cac-5918f0c75f0f UUID: 15e9a03c-6eb1-3d3c-8cac-5918f0c75f0f State: running Persistent: no Autostart: no Capacity: 149.99 GiB Allocation: 62.89 KiB Available: 146.79 GiBBased on the discussion in
CloudStack gets the used bytes information from libvirt.
root@Cloudstack-Kvm-Host3:/home/ubuntu# virsh pool-info 15e9a03c-6eb1-3d3c-8cac-5918f0c75f0f Name: 15e9a03c-6eb1-3d3c-8cac-5918f0c75f0f UUID: 15e9a03c-6eb1-3d3c-8cac-5918f0c75f0f State: running Persistent: no Autostart: no Capacity: 149.99 GiB Allocation: 62.89 KiB Available: 146.79 GiBThat is correct. CloudStack leverages Libvirt for this. If this is broken or wrong in Libvirt, it has to be fixed there. There isn't much CloudStack can do here.
I've set the priority to low as this is outside CloudStack's scope and assigned it to myself.
Will probably close this one soon(ish).
Reacted by kiranchavala@wido Wondering if we should consider it as an enhancement
Bypassing libvirt entirely and querying Ceph directly via restful api to get the usage stats of a erasure code pool or a ceph storage pool
curl -k -u admin: https://<>:8443/api/pool
The usage reporting in cloudstack could also get affected because of querying the data from libvirt
@wido Wondering if we should consider it as an enhancement
Bypassing libvirt entirely and querying Ceph directly via restful api to get the usage stats of a erasure code pool or a ceph storage pool
curl -k -u admin: https://<>:8443/api/pool
The usage reporting in cloudstack could also get affected because of querying the data from libvirt
I doubt if that's a good idea. Technically, yes, it could be done, but I wonder if we can get this to work. Ceph is implemented in the DefaultPrimartStorageDriver and this relies on Libvirt. If we want to do this cleanly we should write a separate Ceph driver for CloudStack, a plugin.
Maybe Libvirt can be improved, getting a patch into Libvirt might be better and more future proof.
Reacted by kiranchavalathis sounds like we want storage extensions now ;)
Reacted by kiranchavalaMaybe @DaanHoogland ! But at this moment I don't see this being changed. Somebody has to invest time into this to get it fixed.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDiscuss
problem
Incorrect Disk usage is reported when a Ceph storage
versions
ACS 4.22.1
ceph version
ceph version 20.2.2 (0fcffee29411e3a38036764817b6e1afc59741cc) tentacle (stable - RelWithDebInfo)
Ubuntu 24.0.4 kvm host
The steps to reproduce the bug
CloudStack added support for ceph erasure code pool in the 4.21 release
github.com/apache/cloudstack/pull/9808
Steps to reproduce the issue
Deploy a data disk of size lets say 5gb on the ceph storage pool
Attach it to a running vm
Populate some data on the data disk
dd if=/dev/urandom of=/dev/vdb bs=1M count=2048 status=progress oflag=direct
Cloudstack is reporting the used size from the replicated metadata pool and not the actual erasure code pool
What to do about it?
CloudStack should report the correct disk size used from the erasure -code pool and not the replicated metadata stats