[linux-lvm] lvmcache shutdown for root filesystem

Paul Richards paul.richards at gmail.com
Fri Jul 5 06:38:19 UTC 2019

Hello there,
I am using lvmcache for my root filesystem.  This works fine except
for rebooting.  On bootup it appears that lvmcache believes the entire
cache is dirty, and begins writing it all out to the origin LV.

To me this sound like a problem discussed on linux-lvm@ previously,
whereby the lvmcache is not correctly deactivated on shutdown due to
it being in use still:


Is there a solution or workaround for this now, or is it the case that
lvmcache should not be used for caching root volumes on machines you
expect to shutdown/reboot frequently?

A possible workaround might be to partially deactivate the lvmcache by
syncing the metadata, then putting it into a frozen read-only state
(cache-pool and origin LVs no longer get written to, blocks don't
migrate, but cache LV reads can still be serviced).  Is there a
mechanism for this?

Thanks in advance for any replies!

PS.  I am ubutnu 18.04 LTS with HWE stack (kernel is currently v4.18)
if that's relevant.

More information about the linux-lvm mailing list