All Projects → artagnon → Phoenixfs

artagnon / Phoenixfs

Licence: mit
🔥 a versioning filesystem inspired by git

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Phoenixfs

Containerfs
a cluster filesystem for containers
Stars: ✭ 264 (+38.22%)
Mutual labels:  fuse, filesystem
Polyfuse
A FUSE (Filesystem in Userspace) library for Rust
Stars: ✭ 76 (-60.21%)
Mutual labels:  fuse, filesystem
Moosefs
MooseFS – Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System (Software-Defined Storage)
Stars: ✭ 1,025 (+436.65%)
Mutual labels:  fuse, filesystem
Onedriver
A native Linux filesystem for Microsoft OneDrive
Stars: ✭ 163 (-14.66%)
Mutual labels:  fuse, filesystem
Litfs
A FUSE file system in Go extended with persistent file storage
Stars: ✭ 116 (-39.27%)
Mutual labels:  fuse, filesystem
Fuse Copyfs
CopyFS is the copy-on-write (COW) versioned filesystem for FUSE. Years ago I added features to CopyFS 1.0, then 1.0.1 came out and I never bothered to forward-port my changes. Now I have. Master is 1.3.1M, which is CopyFS 1.0.1 + 1.3M
Stars: ✭ 24 (-87.43%)
Mutual labels:  fuse, filesystem
Onedrive Fuse Fs
Script to mount Microsoft OneDrive (formerly known as SkyDrive) folder as a FUSE filesystem
Stars: ✭ 68 (-64.4%)
Mutual labels:  fuse, filesystem
Dbxfs
User-space file system for Dropbox
Stars: ✭ 673 (+252.36%)
Mutual labels:  fuse, filesystem
Cryfs
Cryptographic filesystem for the cloud
Stars: ✭ 1,560 (+716.75%)
Mutual labels:  fuse, filesystem
Docker Volume Ipfs
🐳 This is an open source volume plugin that allows using an ipfs filesystem as a volume.
Stars: ✭ 99 (-48.17%)
Mutual labels:  fuse, filesystem
Fuse Ts
Stars: ✭ 6 (-96.86%)
Mutual labels:  fuse, filesystem
Gocryptfs
Encrypted overlay filesystem written in Go
Stars: ✭ 2,088 (+993.19%)
Mutual labels:  fuse, filesystem
Distribyted
📂 ➡️ 📺 🎶 🎮 Torrent client with on-demand file downloading as a filesystem.
Stars: ✭ 791 (+314.14%)
Mutual labels:  fuse, filesystem
Fusell Seed
FUSE (the low-level interface) file system boilerplate 📂 🔌 💾
Stars: ✭ 9 (-95.29%)
Mutual labels:  fuse, filesystem
Fuse Rs
Rust library for filesystems in userspace (FUSE)
Stars: ✭ 735 (+284.82%)
Mutual labels:  fuse, filesystem
Kaitai fs
KaitaiFS: mount any filesystem specified with a .ksy as a real file system
Stars: ✭ 45 (-76.44%)
Mutual labels:  fuse, filesystem
Exfat
Free exFAT file system implementation
Stars: ✭ 528 (+176.44%)
Mutual labels:  fuse, filesystem
S3fs Fuse
FUSE-based file system backed by Amazon S3
Stars: ✭ 5,733 (+2901.57%)
Mutual labels:  fuse, filesystem
Go Fuse
FUSE bindings for Go
Stars: ✭ 1,267 (+563.35%)
Mutual labels:  fuse, filesystem
Mergerfs
a featureful union filesystem
Stars: ✭ 2,114 (+1006.81%)
Mutual labels:  fuse, filesystem

phoenixfs

A filesystem implemented in userspace (using FUSE), inspired by the way Git is designed. Only works on Linux, since macOS implements userspace filesystems differently. Seamlessly versions files on save, without any additional machinery: traps save events in the editor, and writes out to a mount point, in the form of loose objects.

Dependencies

  1. Zlib (>= 1.2)
  2. FUSE (>= 2.6)
  3. pkg-config (>= 0.25)
  4. Linux kernel (>= 2.6.15)

Usage

For the first run, you need two directories:

  1. A git directory where the data will be stored.
  2. An empty directory to use as the mountpoint.
 $ cd /tmp
 $ mkdir gitdir mountp
 $ phoneixfs mount gitdir mountp

Use the mountpoint as you see fit. Data will be written to the gitdir on umount: you can use it for subsequent mounts.

Now, everything in mountpoint is versioned. To access older revisions of FILE, use [email protected] syntax, where REV is the number of revisions in the past you want to access. For example:

 $ echo "hello" >file1
 $ echo "goodbye" >file1
 $ echo "another hello" >file1
 $ cat file1
 another hello
 $ cat [email protected]
 goodbye
 $ cat [email protected]
 hello

Finally, to umount:

 $ fusermount -u mountp

Technical documentation

Uses a B+ tree to keep track of the filesystem tree, and a modified version of packfile v3/ packfile index v2 for storing revision information.

  • gitdir/.git/loose/ contains zlib-deflated versions of content blobs, named by the SHA-1 digest of the content.

  • gitdir/fstree is a raw dump of the B+ tree in a custom format.

  • gitdir/master.pack and gitdir/master.idx are the packfile and packfile index respectively. During an unmount, the files in gitdir/.git/loose/ are packed up, and an index is generated.

  • /tmp/phoenixfs.log is the debug log

master.idx, master.pack, and fstree are enough to recreate the entire versioned filesystem. The files in gitdir/ and gitdir/.git/loose/ can be removed after unmount.

Notes on the filesystem tree:

(dr: directory record | fr: file record | vfr: versioned file record)

  • dr just contains a name and node pointer referencing vfrs. drs are inserted directly into the root node.

  • vfr contains the path of the file, a list of frs representing the various versions of the file (fixed at REV_TRUNCATE), and a HEAD pointer to keep track of the latest version of the file.

  • The B+ tree is keyed by the CRC32 hash of the path of the vfr/ dr, a design decision inspired by Btrfs.

  • An fr, vfr, and dr (corresponding to its path) are created when a new file is created on the filesystem. Empty directories are not tracked: no dr is created for empty directories.

Limitations

The following invocations don't work:

 $ cp [email protected] can't be treated like a file

Contributing

Simply fork the project on GitHub and send pull requests.

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].