caching fs to use over immutable network filesystems https://github.com/moparisthebest/cache-fs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Travis Burtrum d2c3cffb6e Only copy cached index from root if it does not exist locally 8 months ago
src Only copy cached index from root if it does not exist locally 8 months ago
.gitignore First working version 8 months ago
Cargo.lock Implement zstd compression for attribute cache 8 months ago
Cargo.toml Implement zstd compression for attribute cache 8 months ago
LICENSE.md First working version 8 months ago
README.md Add readme 8 months ago

README.md

cache-fs

caching fs to use over immutable network filesystems

The use-case is something like your Steam Deck has a large directory of roms mounted over NFS, but if you disable wifi, you want the roms you've already played still available.

This basically bind-mounts your NFS share over a path of your choosing, except it caches all file attributes/paths forever, and copies the files you open to your cache directory. When you access that file again it doesn't access the remote server at all. So if your remote (say NFS) server is not available, you can still play the games.

If you add/change files to your remote, you must delete /local/cache/dir/cache-fs.tree and remount.

Usage

This assumes you install the cache-fs binary as mount.cachefs, then you can use it in /etc/fstab etc

mount -t cachefs -o cache_dir=/local/cache/dir /remote/dir/to/cache /where/you/want/it/mounted