Skip to content
/ tifs Public
forked from Hexilee/tifs

A distributed POSIX filesystem based on TiKV, with partition tolerance and strict consistency.

License

Notifications You must be signed in to change notification settings

isgasho/tifs

 
 

Repository files navigation

TiFS

A distributed POSIX filesystem based on TiKV, with partition tolerance and strict consistency.

pjdfstest

Installation

Binary(linux-amd64 only)

mkdir tmp
cd tmp
wget https://github.com/Hexilee/tifs/releases/download/v0.1.0/tifs-linux-amd64.tar.gz
tar -xvf tifs-linux-amd64.tar.gz
sudo ./install.sh

Source code

git clone https://github.com/Hexilee/tifs.git
cd tifs
cargo build --features "binc" --no-default-features --release
sudo install target/release/mount /sbin/mount.tifs

Usage

You need a tikv cluster to run tifs. tiup is convenient to deploy one, just install it and run tiup playground.

mkdir ~/mnt
mount -t tifs tifs:127.0.0.1:2379 ~/mnt

Development

cargo build
mkdir ~/mnt
RUST_LOG=debug target/debug/tifs --mount-point ~/mnt

Then you can open another shell and play with tifs in ~/mnt.

Maybe you should enable user_allow_other in /etc/fuse.conf.

for developing under FreeBSD, make sure the following dependencies are met.

pkg install llvm protobuf pkgconf fusefs-libs3 cmake

for now, user_allow_other and auto unmount does not work for FreeBSD, using as root and manually umount is needed.

Contribution

Design

Please refer to the design.md

FUSE

There are little docs about FUSE, refer to the example for the meaning of FUSE API.

Deploy TiKV

Please refer to the tikv-deploy.md.

TODO

  • FUSE API

    • init
    • lookup
    • getattr
    • setattr
    • readlink
    • readdir
    • open
    • release
    • read
    • write
    • mkdir
    • rmdir
    • mknod
    • lseek
    • unlink
    • symlink
    • rename
    • link
    • statfs
    • create
    • fallocate
    • getlk
    • setlk
  • Testing and Benchmarking

    • pjdfstest
    • fio
  • Real-world usage

    • vim
    • emacs
    • git
    • gcc
    • rustc
    • cargo build
    • npm install
    • sqlite
    • tikv on tifs
    • client runs on FreeBSD: simple case works

About

A distributed POSIX filesystem based on TiKV, with partition tolerance and strict consistency.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%