Compress existing data on Ceph

sahostking

Renowned Member
Hi

Is it possible to have ceph compression work on existing pools? I think since I only enable it now compression is only working with new data. How to compress existing data. I am using aggressive mode with lz4
 
I'm trying stopping an OSD and OUTing it then destroy data on the osd. And re-added it. In theory that sounds like it may work as new data replicated to the OSD should be compressed?
 
Not sure if its working.

I know I have to rewrite the data to the OSDs so I assume this may work?

Moving DISK vis NFS to a remote server then deleting it off data_ceph pool when it becomes (unused). The removing it back to data_Ceph?
Will this process work in getting the data compressed on ceph pool?
 
Weirdly enough I just created a new pool and started moving things onto it after enabling compression but somehow I feel its not working properly. I even used "force" and "lz4"

Code:
--- RAW STORAGE ---
CLASS    SIZE   AVAIL    USED  RAW USED  %RAW USED
ssd    38 TiB  15 TiB  23 TiB    23 TiB      60.03
TOTAL  38 TiB  15 TiB  23 TiB    23 TiB      60.03

--- POOLS ---
POOL                   ID  PGS   STORED   (DATA)   (OMAP)  OBJECTS     USED   (DATA)   (OMAP)  %USED  MAX AVAIL  QUOTA OBJECTS  QUOTA BYTES  DIRTY  USED COMPR  UNDER COMPR
device_health_metrics   1    1   73 MiB      0 B   73 MiB       35  218 MiB      0 B  218 MiB      0    922 GiB            N/A          N/A    N/A         0 B          0 B
data_ceph               3  128  2.0 TiB  2.0 TiB   44 KiB  618.59k  5.8 TiB  5.8 TiB  131 KiB  68.04    922 GiB            N/A          N/A    N/A     355 GiB      711 GiB
ceph_data               6  256  6.7 TiB  6.7 TiB  108 KiB    2.49M   17 TiB   17 TiB  324 KiB  86.45    922 GiB            N/A          N/A    N/A     3.0 TiB      6.0 TiB

Its compressing way too little and basically sitting with the same space left as before. No better it seems with compression.

Is it possible the KVM qemu-kvm is not sending a proper hint across? or something else is the issue. Or is this compression the expected amount.