Create the logical volume to use as a cache

Here I use the space from my Proxmox boot SSD. If you have a dedicated SSD you can skip this section and add the whole device as lvm physical volume

lvcreate -l 100%FREE -n cachedev pve

Edit /etc/lvm/lvm.conf find line global_filter

Add a/dev/mapper/pve-cachedev| entry to the existing ones. Below is the example of the line

 global_filter = [ "a|/dev/mapper/pve-cachedev|", "r|/dev/zd.*|", "r|/dev/mapper/pve-.*|" "r|/dev/mapper/.*-(vm|base)--[0-9]+--disk--[0-9]+|"]

Quicksteps: Add and configure the cache device

Note: use lvdisplay to get the names of your VG and LV

pvcreate /dev/mapper/pve-cachedev

VG=ceph-6e0a76c7-9c67-4f4b-bd63-523dd2ce3e9e
LV=osd-block-67d5264a-0933-4946-bdac-fa9f4a23326d
vgextend $VG /dev/mapper/pve-cachedev 
lvcreate -L 130M -n cache_meta $VG /dev/mapper/pve-cachedev
pvdisplay /dev/mapper/pve-cachedev
lvcreate -L 130G -n cache $VG /dev/mapper/pve-cachedev

lvconvert --type cache-pool --cachemode writeback --poolmetadata $VG/cache_meta $VG/cache

lvconvert --type cache --cachepool $VG/cache $VG/$LV

Removing the cache

lvconvert --uncache ceph-2f19d399-7481-42ed-ab8a-b953e55cb84d/osd-block-c8040c04-8529-4fa7-982c-c515c98b7603