Lvm thin pool with SSD cache

First of all, thanks for all your hard work in creating lxd / incus and all the other linuxcontainers stuff in general. I currently have 8 VM nodes running as a kubernetes cluster in incus and things are running great so far.

Is it possible to create an lvm thin pool on some spinning drives with a cache on a smaller SSD? I couldn’t figure out exactly how to do this based on the docs.

It looks like there is a way to create a LVM thin pool with a caching layer directly through LVM.
Incus itself doesn’t support doing that kind of stuff but if you pre-create the thinpool you can just tell Incus to consume your existing (empty) thin pool and get to use that kind of more complex LVM configuration the way.

if you pre-create the thinpool you can just tell Incus to consume your existing (empty) thin pool

i.e. if you’ve created volume group vg0 then you can do:

incus storage create vg0 lvm lvm.vg.force_reuse=true lvm.use_thinpool=true source=vg0

However, I’ve never used LVM cache volumes myself, and it’s unclear from the documentation whether for every LV you create, you also have to enable caching on it. This blog is quite good, but implies it is necessary to activate caching on each LV - and it’s unclear whether multiple LVs can share the same cache.

If extra work is needed for each volume which incus creates to configure caching, then I think you’d have to do that manually.