Can you explain why combing different LVM caches is (not) possible/meaningful?

Hello,

I am thinking about speeding up a slow drive with ssd caches. I have two small ssds. I consider that I can accept read cache loss, but would love to configure writecache as raid-1. However, it seems that LVM cache advice always suggests the user opts for either LVM cache (ie. cominbed read&write) OR the writecache (write only), but not both.

Is combining both cache types indeed not possible? A simple explanation for why would be of great help.
Thanks!

1 Like

What do you mean by “both cache types”?

1 =writethrough ?
2 = writeback ?

1 Like

1= read/write cache, aka dm-cache
2= writecache, aka dm-writecache

wasn’t bcache for what you want to archive ?

  • no idea how it plays with LVM -

https://wiki.archlinux.org/title/bcache

1 Like

“Chapter 13. Enabling caching to improve logical volume performance Red Hat Enterprise Linux 8 | Red Hat Customer Portal” Chapter 11. Enabling caching to improve logical volume performance Red Hat Enterprise Linux 8 | Red Hat Customer Portal

According to the above Redhat document, dm-cache operates in read/write mode while dm-writecache operates in write only mode .

If you want to cache both writes and reads, you just need to use dm-cache. While when only writes need cached, you just need dm-writecache.

As a result, there is no need to use both at the same time.

4 Likes

Btw, LVM supports Mirrored Volumes, so you don’t necessarily need an extra layer of software raid (mdadm)

See:

2 Likes

Thanks everybody, the links, some more reading helped. Am now going for a simple LVM read-write cache - whenever I manage to install F35 afresh on my machine (currently not possible, sadly because of some issue with Anaconda).

1 Like

4 posts were split to a new topic: Legacy install on gpt layout; anaconda asks for biosboot