2

I currently have a debian-based Linux system that I'd like to optimize heavily. This machine has three different drives: An SLC SSD, a QLC SSD, and a 4TB HDD. I wanted to know if it was possible to create a multi-tier caching solution that leverages both of the SSDs for caching at different levels.

My utopian structure is this:

  • SLC SSD (fastest, good-reliability): Hot Cache for files that are written to and read often
  • QLC SSD (fast, OK-reliability): Warm Cache for (potentially larger) files that are written to and read from less often
  • HDD (slow, high-reliability): Cold Storage for files that aren't written to or read often

Unfortunately, I haven't found much in terms of capabilities for multi-tier caching that allows for this type of configuration in the most common linux utilities I've found for this: lvmcache or bcache.

My question is whether or not it is possible to configure lvmcache or bcache to be leverage these drives in such a way? And, if not, are there solutions out there that enable such a configuration?

1
  • i belive you wanna have a raid 1 with a hot spare like software raid or hw raid controller can provide
    – djdomi
    Mar 21 at 11:50
1

No, it is not possible unless you want to experiment with multiple, nested lvmcache/dm-cache devices, which is a complex setup difficult to maintain and debug.

Do yourself a favour and use the SLC SSD to cache your HDD, while keeping the QLC drive for mostly read only data (ie: root and home volumes)

1
  • In other words, lvm0 > (dm-writecache + lv0(lvm1 > dm-cache + lv(n)...))? I didn't even think it was possible to have LVM inside of LVM.
    – Swivel
    Apr 29 at 3:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.