3

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.

2
  • 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
    Commented May 18, 2017 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
    Commented May 18, 2017 at 15:23

1 Answer 1

-2

try lvm2, it sounds exactly what you need.

#  yum install lvm2*

It's been a while, but when you fdisk the 32GB SSD for use by lvm2, you have to add a flag to make the partition lvm-able

4
  • 2
    How would a Logical Volume Manager help?
    – fpmurphy
    Commented May 17, 2017 at 19:49
  • To defend the @AfroJoe's answer, there is a caching included in LVM, but it doesn't work on principle "cache frequently accessed files". It only caches recent files, which is a big difference in terms of speed and it is not what OP asked for. Commented May 18, 2017 at 8:14
  • I'm happy even with recent accessed files. My main concern is not performance, but keeping that HDD offline while working on (mostly the same) files as much as possible. I've heard about LVM but I don't know much about the working principle, I will investigate it!
    – Cody
    Commented May 18, 2017 at 13:15
  • From what I've read (in the last 10 minutes) it seems unclear if it allows for the origin volume to be unmounted (without issues) and still continue to use the persistent cached files. Also NOTE that in my case the disconnection is done by the pushing of a mechanical button, so during this action the system has no notify that I am removing the drive. Not that I'm lazy to notify myself the system to unmount, but the connector is a bit messy and by moving the hinge back and forth sometimes it looses connection... Still reading on LVM CACHING
    – Cody
    Commented May 18, 2017 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .