-
Notifications
You must be signed in to change notification settings - Fork 305
Description
What happened:
When creating a DataVolume on a ceph-rbd RWO filesystem volume, for small sizes, the created disk.img does not match the requested size even though the volume is large enough to hold it. I found this while working on an issue in KubeVirt where we create a blank 512Mi fs rwo volume.
What I observed was that the disk.img size reported by qemu-img info was about 506Mi instead of the 512Mi requested, while the actual FS volume was 540Mi, which left enough space for the 512Mi on the volume.
What you expected to happen:
I expect the disk.img size reported by qemu-img to ALWAYS be the requested size from the PVC and not be smaller in this scenario.
How to reproduce it (as minimally and precisely as possible):
- Create a blank DV using the storage field and specify you want filesystem and RWO on a ceph-rbd storage class. Also specify the size to be 512Mi.
- Let CDI finish creating the PVC and populating it.
- Create a pod that uses the created PVC (use the cdi-import container image so you get qemu-img). And run qemu-img info on the disk.img file. You will notice it is < 512Mi
Additional context:
Add any other context about the problem here.
Environment:
- CDI version (use
kubectl get deployments cdi-deployment -o yaml): 1.64.0 - Kubernetes version (use
kubectl version): 1.34 - DV specification: N/A
- Cloud provider or hardware configuration: N/A
- OS (e.g. from /etc/os-release): N/A
- Kernel (e.g.
uname -a): N/A - Install tools: N/A
- Others: N/A