kiranchavala opened a new issue, #13718:
URL: https://github.com/apache/cloudstack/issues/13718

   ### 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)
   
   ### 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 
   
   1. Create a ceph-storage with Erasure code setting
   
   ```
   ceph osd erasure-code-profile set cloudstack-ec k=2 m=1 
crush-failure-domain=host
   ceph osd pool create cloudstack-ec 64 erasure cloudstack-ec
   ceph osd pool set cloudstack-ec allow_ec_overwrites true
   ceph osd pool application enable cloudstack-ec rbd
   
   ceph osd pool create cloudstack-ec-metadata 32 replicated
   ceph osd pool set cloudstack-ec-metadata size 3
   rbd pool init cloudstack-ec-metadata
   
   
   
   ```
   
   2. Add the storage pool in cloudstack 
   
   ```
   createStoragePool scope=zone zoneid=<ZONE_ID> hypervisor=KVM \
     name=MyCephECCluster provider=DefaultPrimary \
     url=rbd://cloudstack:<RADOS_SECRET>@192.168.55.11/cloudstack-ec-metadata \
     details[0].key=dataPool details[0].value=cloudstack-ec \
     tags=RBD-EC
   
   ```
   
   3. Check the disk usage from ceph side 
   
   ```
   
   root@ceph1:/home/ubuntu# ceph df
   --- RAW STORAGE ---
   CLASS     SIZE    AVAIL     USED  RAW USED  %RAW USED
   hdd    150 GiB  150 GiB  200 MiB   200 MiB       0.13
   TOTAL  150 GiB  150 GiB  200 MiB   200 MiB       0.13
   
   --- POOLS ---
   POOL                    ID  PGS   STORED  OBJECTS     USED  %USED  MAX AVAIL
   
   cloudstack-ec            3   64    8 KiB        1   12 KiB      0     95 GiB
   cloudstack-ec-metadata   4   32  7.9 KiB        3   36 KiB      0     47 GiB
   
   
   ```
   4. Check the Disk used size  from Cloudstack 
   
   <img width="1565" height="713" alt="Image" 
src="https://github.com/user-attachments/assets/34bd3e90-7603-45d9-a968-6bc37bd59d7b";
 />
   
   
   
   5. Deploy a data disk of size lets say 5gb on the ceph storage pool 
   
   6. Attach it to a running vm 
   
   7. Populate some data on the data disk 
   
   dd if=/dev/urandom of=/dev/vdb bs=1M count=2048 status=progress oflag=direct
   
   8. Check the ceph disk usage 
   
   ```
   root@ceph1:/home/ubuntu# ceph df
   --- RAW STORAGE ---
   CLASS     SIZE    AVAIL     USED  RAW USED  %RAW USED
   hdd    150 GiB  147 GiB  3.2 GiB   3.2 GiB       2.13
   TOTAL  150 GiB  147 GiB  3.2 GiB   3.2 GiB       2.13
   
   --- POOLS ---
   POOL                    ID  PGS   STORED  OBJECTS     USED  %USED  MAX AVAIL
   .mgr                     1    1  577 KiB        2  1.7 MiB      0     46 GiB
   cloudstack               2   64  6.8 KiB        3   32 KiB      0     46 GiB
   cloudstack-ec            3   64  2.0 GiB      513  3.0 GiB   2.11     93 GiB
   cloudstack-ec-metadata   4   32  9.1 KiB        6   62 KiB      0     46 GiB
   
   
   
   ```
   
   9. Check the cloudstack storage used 
   
   <img width="1478" height="760" alt="Image" 
src="https://github.com/user-attachments/assets/5ac70e19-745f-4567-923b-4ff48c627300";
 />
   
   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 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to