←back to thread

432 points ingve | 6 comments | | HN request time: 0.684s | source | bottom
1. sorenjan ◴[] No.44467571[source]
Is it possible (and easy) to make a NAS with harddrives for storage and an SSD for cache? I don't have any data that I use daily or even weekly, so I don't want the drives spinning needlessly 24/7, and I think an SSD cache would stop having to spin them up most of the time.

For instance, most reads from a media NAS will probably be biased towards both newly written files, and sequentially (next episode). This is a use case CPU cache usually deals with transparently when reading from RAM.

replies(3): >>44467578 #>>44467673 #>>44469239 #
2. op00to ◴[] No.44467578[source]
Yes. You can use dm-cache.
replies(1): >>44467624 #
3. sorenjan ◴[] No.44467624[source]
Thanks. I looked it up and it seems that lvmcache uses dm-cache and is easier to use, I guess putting that in front of some kind of RAID volume could be a good solution.
4. QuiEgo ◴[] No.44467673[source]
https://github.com/trapexit/mergerfs/blob/master/mkdocs/docs...

I do this. One mergerfs mount with an ssd and three hdds made to look like one disk. Mergerfs is set to write to the ssd if it’s not full, and read from the ssd first.

A chron job moves out the oldest files on the ssd once per night to the hdds (via a second mergerfs mount without the ssd) if the ssd is getting full.

I have a fourth hdd that uses snap raid to protect the ssd and other hdds.

replies(1): >>44467740 #
5. QuiEgo ◴[] No.44467740[source]
Also, https://github.com/bexem/PlexCache which moves files between disks based on their state in a Plex DB
6. Nursie ◴[] No.44469239[source]
I used to run a zfs setup with an ssd for L2ARC and SLOG.

Can’t tell you how it worked out performance-wise, because I didn’t really benchmark it. But it was easy enough to set up.

These days I just use SATA SSDs for the whole array.