I am looking for a stackable file system (Like UnionFS,
aufs, and OverlayFS) that works similar to
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
Does such stackable file system exist? Can it be done with
aufs or similar?
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.
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.