A distributed file system in Go (1.26+): Master (metadata, Raft), ChunkServers (64 MiB chunks on disk), 3× replication by default (primary + SyncChunk to secondaries). Use GODFS_REPLICATION=1 for single-replica dev.
Production-ready baseline: REST /v1, Linux FUSE, operator CLI, snapshots, presigned GET/PUT, multipart uploads, observability bundle, and Kubernetes guides are in the repository. Completion criteria and release acceptance: docs/COMPLETION_PLAN.md and docs/RELEASE_CHECKLIST.md.
The master can run in two modes:
- Single process, in-memory metadata (no Raft env) — local development only.
- Raft cluster —
GODFS_MASTER_NODE_ID,GODFS_MASTER_RAFT_LISTEN,GODFS_MASTER_RAFT_DIR,GODFS_MASTER_PEERS, one-timeGODFS_MASTER_BOOTSTRAP=1. Seedeployments/k8s/OPERATIONS.mdanddocs/K8S_PRODUCTION.md.
Start here: docs/GETTING_STARTED.md (REST, FUSE, Helm/K8s, security, env vars, runbook).
Master:
go run ./cmd/masterChunkServer (registers with Master):
set GODFS_MASTER=127.0.0.1:9090
set GODFS_ADVERTISE_ADDR=127.0.0.1:8000
go run ./cmd/chunkserverOn Linux/macOS, use export instead of set:
export GODFS_MASTER=127.0.0.1:9090
export GODFS_ADVERTISE_ADDR=127.0.0.1:8000
go run ./cmd/chunkserverCLI:
go run ./cmd/client --master 127.0.0.1:9090 mkdir /data
go run ./cmd/client --master 127.0.0.1:9090 create /data/hello.txt
go run ./cmd/client --master 127.0.0.1:9090 write /data/hello.txt ./local.txt
go run ./cmd/client --master 127.0.0.1:9090 read /data/hello.txt ./out.txtEnvironment variables (summary): see docs/ENV_REFERENCE.md.
- Master:
GODFS_MASTER_LISTEN,GODFS_CHUNK_SIZE_BYTES,GODFS_REPLICATION, RaftGODFS_MASTER_RAFT_*. - Chunk:
GODFS_MASTER,GODFS_CHUNK_DATA,GODFS_NODE_ID,GODFS_ADVERTISE_ADDR.
For 3× replication, run three ChunkServer processes with distinct GODFS_NODE_ID, GODFS_CHUNK_DATA, GODFS_CHUNK_LISTEN, and GODFS_ADVERTISE_ADDR (e.g. ports 8000, 8001, 8002), then start Master and use the client as usual.
internal/domain— File, Chunk, Node entities and errors.internal/adapter/repository/metadata— in-memory namespace (single-master mode).internal/raftmeta— Raft-backed metadata and FSM (when Raft env is configured).internal/adapter/repository/chunk— on-disk chunk storage (*.chkfiles).internal/adapter/grpc— Master and Chunk gRPC services (fromapi/proto).pkg/client— SDK:Create,Mkdir,Read,ReadRange,Write,WriteAt,Delete,Rename,Stat,List.
Default chunk size: 64 MiB.
End-to-end tests (in-process Master + ChunkServers, no Docker):
go test ./test/e2e/...Unit tests: go test ./internal/...
REST integration tests (requires a running REST gateway, e.g. docker compose -f deployments/docker/docker-compose.yml up -d):
go test ./test/integration -tags=integration -count=1Static analysis locally (same linters as CI): install golangci-lint and run golangci-lint run from the repo root.
- REST:
cmd/restgateway— HTTP/v1API (BearerAuthorization, streaming GET/PUT, multipart, metrics, OTel). Seedocs/EXTERNAL_ACCESS.md,docs/GETTING_STARTED.md, anddeployments/k8s/restgateway.yamlfor Kubernetes. - FUSE (Linux only):
cmd/fuse— mount a namespace prefix withgo run ./cmd/fuse --mountpoint /mnt/godfs --prefix /data(requiresfusermount3,GODFS_MASTER, optionalGODFS_CLIENT_API_KEY). Flags: cache TTL,--rpc-timeout. Details:docs/EXTERNAL_ACCESS.md§3 anddocs/GETTING_STARTED.md.
Apache-2.0