# Use SSD for caching files from HDD

I don't have a name for this so I'll present my special user case:

I have an hybrid-laptop made of a tablet slate of only 32GB SSD and a 500GB HDD build into the USB keyboard-dock and I want to make a better use of that HDD without having it constantly spinning (I take a big hit on battery life otherwise)

Let's say I create a mount point \mnt\Data that resides on my external HDD. What I want to achieve is to have part (not all) of the files in that directory (maybe last n used\opened ones) cached inside my SSD somewhere without having me to copy them manually, and then update the old ones into the HDD once I modify them.

What I am looking for: Having 10-20 files I often/recently use cached and modify them on my SSD, rather than directly access it from HDD, allows me to work without the system spinning up my HDD (saving me a lot of power).

Even when I save my work, the HDD is not absolutely required to wakeup to update the files suddenly, this can happen even in time intervals for what I'm concerned.

The HDD is for tablet use only, so I'm not worried about the files being modified externally, they just have to get updated every x-minutes to mirror the SSD "cached" file modifications back to the HDD copy of the file.

Questions

1. Is there any newer linux set of tools that could do that kind of caching\partial syncing of files automatically, other than bcach?

2. If bcache is the answer, then should I even consider bdcachefs ? (including building the kernel under Arch, noobAlert!)

3. Do you guys think I should better use a backup solution to keep versions of my SSD Data files on my HDD? (but this way I think I will end up with just a bounce of versions of the same files)

I hope my description was explanatory enough of what I'm trying to achieve!

ADD: I've found this question: SSD as a read cache for FREQUENTLY read data , which describes mostly what I'm looking for but it is 4 years old (not that I wouldn't investigate such solutions only 'cus of age), I was wondering if there were any newer approaches, probably a bit more "contained" than bcache.

EDIT : A small dettagli that it wasn't clear in the first part of the OP is that the HDD needs to allow for unmount and remounting. The removal of the tablet from it's dock is done by a mechanical button so there is no system notify for unmounting done automatically.

• your time & effort trying to do what you describe might be better off just buying a new 256gb or 500gb SSD. I know you said they were built in but you did not specifically state the SSD or HDD cannot be removed. Sometimes you can open the thing up and replace it if it's not a system-on-chip design. – ron May 18 '17 at 13:43
• SSD is soldered on by Mobo. Upgrading the HDD to an SSD on the dock I don't think it will help much with power consumption. And last, all this is more out of a hobby/will of trying it out rather than actually necessity. – Cody May 18 '17 at 15:23

#  yum install lvm2*