All Projects → kahing → Catfs

kahing / Catfs

Licence: apache-2.0
Cache AnyThing filesystem written in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Catfs

Distribyted
📂 ➡️ 📺 🎶 🎮 Torrent client with on-demand file downloading as a filesystem.
Stars: ✭ 791 (+95.79%)
Mutual labels:  fuse, fuse-filesystem, filesystem
fuse xattrs
add xattrs support using sidecar files.
Stars: ✭ 28 (-93.07%)
Mutual labels:  fuse, filesystem, fuse-filesystem
S3fs Fuse
FUSE-based file system backed by Amazon S3
Stars: ✭ 5,733 (+1319.06%)
Mutual labels:  fuse, fuse-filesystem, filesystem
Securefs
Filesystem in userspace (FUSE) with transparent authenticated encryption
Stars: ✭ 518 (+28.22%)
Mutual labels:  fuse, fuse-filesystem, filesystem
GitFS
A FUSE filesystem that stores data on Git
Stars: ✭ 26 (-93.56%)
Mutual labels:  fuse, filesystem, fuse-filesystem
Fusell Seed
FUSE (the low-level interface) file system boilerplate 📂 🔌 💾
Stars: ✭ 9 (-97.77%)
Mutual labels:  fuse, fuse-filesystem, filesystem
Fuse Ts
Stars: ✭ 6 (-98.51%)
Mutual labels:  fuse, fuse-filesystem, filesystem
loggedfs-python
Filesystem monitoring with Fuse and Python
Stars: ✭ 21 (-94.8%)
Mutual labels:  fuse, filesystem, fuse-filesystem
Supertag
A tag-based filesystem
Stars: ✭ 207 (-48.76%)
Mutual labels:  fuse, fuse-filesystem, filesystem
Cryfs
Cryptographic filesystem for the cloud
Stars: ✭ 1,560 (+286.14%)
Mutual labels:  fuse, fuse-filesystem, filesystem
fusell-seed
FUSE (the low-level interface) file system boilerplate 📂 🔌 💾
Stars: ✭ 13 (-96.78%)
Mutual labels:  fuse, filesystem, fuse-filesystem
Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+873.27%)
Mutual labels:  fuse, fuse-filesystem, filesystem
acid-store
A library for secure, deduplicated, transactional, and verifiable data storage
Stars: ✭ 48 (-88.12%)
Mutual labels:  fuse, filesystem
pcloud-console-client
A simple console client for pCloud cloud storage.
Stars: ✭ 22 (-94.55%)
Mutual labels:  fuse, fuse-filesystem
Svfs
The Swift Virtual File System
Stars: ✭ 375 (-7.18%)
Mutual labels:  fuse, filesystem
xwmfs
X11 Window-Manager file system based on FUSE
Stars: ✭ 21 (-94.8%)
Mutual labels:  fuse, fuse-filesystem
hdrfs
High Data Retention Filesystem
Stars: ✭ 23 (-94.31%)
Mutual labels:  filesystem, fuse-filesystem
ratarmount
Random Access Read-Only Tar Mount
Stars: ✭ 217 (-46.29%)
Mutual labels:  fuse, filesystem
ext2py
The slowest ext2fs driver ever! (in Python)
Stars: ✭ 14 (-96.53%)
Mutual labels:  fuse, filesystem
storage
Go package for abstracting local, in-memory, and remote (Google Cloud Storage/S3) filesystems
Stars: ✭ 49 (-87.87%)
Mutual labels:  filesystem, cache

Catfs is a caching filesystem written in Rust.

Build Status Crates.io Crates.io Downloads GitHub All Releases Twitter Follow

Overview

Catfs allows you to have cached access to another (possibly remote) filesystem. Caching semantic is read-ahead and write-through (see Current Status). Currently it only provides a data cache and all metadata operations hit the source filesystem.

Catfs is ALPHA software. Don't use this if you value your data.

Installation

  • On Linux, install via pre-built binaries. You may also need to install fuse-utils first.

  • Or build from source which requires Cargo.

:~/catfs$ cargo install catfs
$ # optimized binary now in $HOME/.cargo/bin/catfs

Usage

Catfs requires extended attributes (xattr) to be enabled on the filesystem where files are cached to. Typically this means you need to have user_xattr mount option turned on.

$ catfs <from> <to> <mountpoint>

Catfs will expose files in <from> under <mountpoint>, and cache them to <to> as they are accessed. You can use --free to control how much free space <to>'s filesystem has.

To mount catfs on startup, add this to /etc/fstab:

catfs#/src/dir#/cache/dir /mnt/point    fuse    allow_other,--uid=1001,--gid=1001,--free=1%   0       0

Benchmark

Compare using catfs to cache sshfs vs sshfs only. Topology is laptop - 802.11n - router - 1Gbps wired - desktop. Laptop has SSD whereas desktop has spinning rust.

Benchmark result

Compare running catfs with two local directories on the same filesystem with direct access. This is not a realistic use case but should give you an idea of the worst case slowdown.

Benchmark result

Write is twice as slow as expected since we are writing twice the amount.

To run the benchmark, do:

$ sudo docker run -e [email protected] --rm --privileged --net=host -v $PWD/target:/root/catfs/target kahing/catfs-bench
 # result is written to $PWD/target

The docker container will need to be able to ssh to [email protected]. Typically I arrange that by mounting the ssh socket from the host

$ sudo docker run -e SSHFS_OPTS="-o ControlPath=/root/.ssh/sockets/%[email protected]%h_%p -o ControlMaster=auto -o StrictHostKeyChecking=no -o Cipher=arcfour [email protected]:/tmp" -e [email protected] --rm --privileged --net=host -v $HOME/.ssh/sockets:/root/.ssh/sockets  -v $PWD/target:/root/catfs/target kahing/catfs-bench

License

Copyright (C) 2017 Ka-Hing Cheung

Licensed under the Apache License, Version 2.0

Current Status

Catfs is ALPHA software. Don't use this if you value your data.

Entire file is cached if it's open for read, even if nothing is actually read.

Data is written-through to the source and also cached for each write. In case of non-sequential writes, catfs detects ENOTSUP emitted by filesystems like goofys and falls back to flush the entire file on close(). Note that in the latter case even changing one byte will cause the entire file to be re-written.

References

  • Catfs is designed to work with goofys
  • FS-Cache provides caching for some in kernel filesystems but doesn't support other FUSE filesystems.
  • Other similar fuse caching filesystems, no idea about their completeness:
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].