Using two SSDs for Hot-Warm-Cold Caching a HDD on Linux
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?
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)