A distributed POSIX filesystem in Go, replicated with Raft consensus and mounted via FUSE. Every metadata operation and file write flows through a replicated log, so the filesystem stays consistent across the cluster and survives node crashes, restarts, and network partitions.
┌─ FUSE (POSIX) ─┐ ┌─ FSM (metadata) ─┐ ┌─ Raft (consensus) ─┐
│ mkdir, write… ├──▶│ inodes, dirtree ├──▶│ log, elections, │
│ on any node │ │ dedup sessions │ │ snapshots │
└────────────────┘ └──────────────────┘ └────────────────────┘
- Strong consistency — linearizable writes through the Raft log; linearizable reads via majority-ack leader leases
- POSIX operations — create, read, write, mkdir, rename, chmod, hard links, symlinks (via FUSE, Linux)
- Mount anywhere — a leader-following client redirects operations, so a mount on a follower keeps working across failovers
- Exactly-once retries — client sessions deduplicate across leader changes and partitions
- Fault tolerance — an N-node cluster tolerates (N-1)/2 failures; chaos-tested with crashes, restarts, partitions, delays, packet loss
- Operable — Prometheus metrics, structured logs, health/readiness
endpoints,
raftctladmin CLI
make build # bin/raftfs, bin/raftctl, bin/raftfs-benchmark
./scripts/start-cluster.sh 3
bin/raftctl --cluster 127.0.0.1:9101,127.0.0.1:9102,127.0.0.1:9103 status
./scripts/stop-cluster.sh --cleanOr with Docker (mounts the filesystem inside the first container):
docker compose -f deployments/docker/docker-compose.yaml up --build -d
docker exec raftfs-0 sh -c 'echo hello > /mnt/raftfs/f.txt && cat /mnt/raftfs/f.txt'See docs/guides/quickstart.md for details and docs/guides/operations.md for configuration, metrics, and troubleshooting.
| Path | Purpose |
|---|---|
pkg/raft |
Raft consensus core (elections, log, snapshots) |
pkg/fsm |
Deterministic filesystem state machine |
pkg/rsm |
Replication coordinator: submit, dedup, snapshots |
pkg/network |
Peer RPC transport + leader-following client |
pkg/fuse |
FUSE layer (Linux) and client sessions |
pkg/storage |
BoltDB Raft persistence, local file data store |
pkg/admin |
Admin HTTP API (status, health, metrics, snapshot) |
cmd/raftfs |
Node binary |
cmd/raftctl |
Admin CLI |
docs/ |
Architecture, design, guides |
Under active development. Consensus, the filesystem core, multi-node clustering, and observability are implemented and tested (unit, integration, and chaos suites, all race-clean). See docs/design/implementation-roadmap.md for progress and what's next.