基于 TiKV 的分布式 POSIX 文件系统,具有分区容错性和严格一致性。
A distributed POSIX filesystem based on TiKV, with partition tolerance and strict consistency.
libfuse and build-essential are required, in ubuntu/debian:sudo apt install -y libfuse-dev libfuse3-dev build-essentialbrew install --cask osxfusefuse3 and openssl are required, in ubuntu/debian:sudo apt-get install -y libfuse3-dev fuse3 libssl-devbrew install --cask osxfuseIn Catalina or former version, you need to load osxfuse into the kernel:
/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuseYou can use the image on docker hub or build from the Dockerfile.
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.shThe
install.shmay fail in macOS Catalina or Big Sur because of the SIP.You can just use the
target/release/tifsto mount tifs.Example
target/release/tifs tifs:127.0.0.1:2379 ~/mnt
git clone https://github.com/Hexilee/tifs.git
cd tifs
sudo make installYou need a tikv cluster to run tifs. tiup is convenient to deploy one, just install it and run tiup playground.
docker run -d --device /dev/fuse \
--cap-add SYS_ADMIN \
-v :/mnt:shared \
hexilee/tifs:0.2.2 --mount-point /mnt --pd-endpoints 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.
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 mkdir
mount -t tifs tifs: 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.
direct_ioEnable global direct io, to avoid page cache.
mount -t tifs -o direct_io tifs: blksizeThe block size, 64KiB by default, could be human-readable.
mount -t tifs -o blksize=512 tifs: maxsizeThe quota of fs capacity, could be human-readable.
mount -t tifs -o maxsize=1GiB tifs: cargo build
mkdir ~/mnt
RUST_LOG=debug target/debug/tifs --mount-point ~/mntThen 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 cmakefor now, user_allow_other and auto unmount does not work for FreeBSD, using as root and manually umount is needed.
Please refer to the design.md
There are little docs about FUSE, refer to the example for the meaning of FUSE API.
Please refer to the tikv-deploy.md.
FUSE API
Testing and Benchmarking
Real-world usage
暂无开放 Issues,或尚未同步最近议题。