I am looking for a stackable file system (Like UnionFS,
aufs
, and OverlayFS) that works similar to bcache
or lvmcache
but on file level - not on block level:
- Reads will be done from top-layer. If the file is not there, read the file from bottom-layer and store it in top-layer.
- Writes will be done to top-layer. After write is done, it will also be written to bottom-layer (like write-back/write-behind caching)
- When the top-layer reaches a certain size, files will be erased from the top-layer (like an LRU cache). Files will only be removed if they have been written to bottom-layer.
For my use bottom-layer will be 10-1000 times bigger than top-layer - in other words: bottom-layer will not fit in top-layer (again similar to bcache
).
Does such stackable file system exist? Can it be done with aufs
or similar?
**Background**
I *love* file systems, and use all sorts of Fuse-based file systems. But file systems like sshfs
can be rather slow, and it would be really handy to have a way of speeding that up if you know that the bottom-layer will only be changed through this system.
Using an sshfs
mounted dir as the bottom-layer is just one example, so I am not looking for a specialized approach, that deals with sshfs
. I am looking for a general approach where the top-layer and the bottom-layer are just treated as dirs.
Asked by Ole Tange
(37348 rep)
Mar 4, 2020, 12:01 AM
Last activity: Mar 4, 2020, 08:46 PM
Last activity: Mar 4, 2020, 08:46 PM