百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tifs

> 编程语言
开源

基于 TiKV 的分布式 POSIX 文件系统,具有分区容错性和严格一致性。

362 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

基于 TiKV 的分布式 POSIX 文件系统,具有分区容错性和严格一致性。

TiFS

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

Environment

Build

  • Linux libfuse and build-essential are required, in ubuntu/debian:
bash
sudo apt install -y libfuse-dev libfuse3-dev build-essential
  • macOS
bash
brew install --cask osxfuse

Runtime

  • Linux fuse3 and openssl are required, in ubuntu/debian:
bash
sudo apt-get install -y libfuse3-dev fuse3 libssl-dev
  • macOS
bash
brew install --cask osxfuse

In Catalina or former version, you need to load osxfuse into the kernel:

/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse

Installation

Container

You can use the image on docker hub or build from the Dockerfile.

Binary(linux-amd64 or darwin-amd64)

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

The install.sh may fail in macOS Catalina or Big Sur because of the SIP.

You can just use the target/release/tifs to mount tifs.

Example

target/release/tifs tifs:127.0.0.1:2379 ~/mnt

Source code

bash
git clone https://github.com/Hexilee/tifs.git
cd tifs
sudo make install

Usage

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

Container

bash
docker run -d --device /dev/fuse \
    --cap-add SYS_ADMIN \
    -v :/mnt:shared \
    hexilee/tifs:0.2.2 --mount-point /mnt --pd-endpoints 

TLS

You need ca.crt, client.crt and client.key to access TiKV cluster on TLS.

It will be convenient to get self-signed certificates by sign-cert.sh(based on the easy-rsa).

You should place them into a directory and execute following docker command.

bash
docker run -d --device /dev/fuse \
    --cap-add SYS_ADMIN \
    -v :/root/.tifs/tls \
    -v :/mnt:shared \
    hexilee/tifs:0.3.1 --mount-point /mnt --pd-endpoints 

Binary

bash
mkdir 
mount -t tifs tifs: 

TLS

bash
mount -t tifs -o tls= tifs: 

By default, the tls-config should be located in ~/.tifs/tls.toml, refer to the tls.toml for detailed configuration.

Other Custom Mount Options

direct_io

Enable global direct io, to avoid page cache.

bash
mount -t tifs -o direct_io tifs: 

blksize

The block size, 64KiB by default, could be human-readable.

bash
mount -t tifs -o blksize=512 tifs: 

maxsize

The quota of fs capacity, could be human-readable.

bash
mount -t tifs -o maxsize=1GiB tifs: 

Development

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

bash
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

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustdistributed-file-systemdistributed-systemsfilesystemfuse

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言