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?

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

1 Answers1

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)

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • 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 '21 at 03:31