A vibe-coded, experimental distributed storage system in Go using a NATS/Jetstream control-plane.
  • Go 94.4%
  • Shell 4.4%
  • C 0.6%
  • Makefile 0.2%
  • Java 0.1%
  • Other 0.1%
Find a file
Brian Wiborg 6d9969c79f
🧪 Qualify online storage lifecycle under S3 traffic
- Add a bounded laptop drill for expansion, interrupted drain, and failed-drive replacement
- Verify capacity growth, payload redistribution, acknowledged data, and clean shard convergence
- Exercise CLI interruption, controller fencing, and OSD crash/restart
- Record retries and latency, preserve failure diagnostics, and add focused tests
- Document the harness and prioritize lifecycle qualification in the roadmap
2026-09-06 12:20:33 +02:00
auditarchive Add site-local S3 supercluster federation 2026-08-21 21:56:55 +02:00
authoritybackup Add site-local S3 supercluster federation 2026-08-21 21:56:55 +02:00
authoritymonitor Add site-local S3 supercluster federation 2026-08-21 21:56:55 +02:00
cluster Add safe S3 storage-class retirement and detach 2026-09-05 23:53:33 +02:00
cmd/laniakea Add safe S3 storage-class retirement and detach 2026-09-05 23:53:33 +02:00
config 🚚 organize repository documentation and tooling 2026-09-02 22:49:33 +02:00
control Add safe S3 storage-class retirement and detach 2026-09-05 23:53:33 +02:00
controller Add paginated shard health inspection 2026-09-02 21:37:48 +02:00
controlplane Add site-local S3 supercluster federation 2026-08-21 21:56:55 +02:00
deployments (federation): add operable three-site S3 supercluster 2026-09-03 23:53:09 +02:00
docs 🧪 Qualify online storage lifecycle under S3 traffic 2026-09-06 12:20:33 +02:00
ecstore 🪣 Complete the replicated S3 data plane and cross-site replication 2026-09-01 18:31:12 +02:00
erasure 🪣 Complete the replicated S3 data plane and cross-site replication 2026-09-01 18:31:12 +02:00
federation 🪣 Complete the replicated S3 data plane and cross-site replication 2026-09-01 18:31:12 +02:00
federator 🪣 Complete the replicated S3 data plane and cross-site replication 2026-09-01 18:31:12 +02:00
filesystem 🎉 Big Bang! 2026-08-04 18:17:22 +02:00
fsclient 💄 Rename OSD node identity throughout the stack 2026-08-09 16:50:53 +02:00
fusefs Add a complete local lab and streamline cluster operations 2026-08-09 06:14:40 +02:00
gateway 🛡 Harden sparse I/O and background maintenance 2026-09-01 22:28:07 +02:00
integration 🧪 Qualify online storage lifecycle under S3 traffic 2026-09-06 12:20:33 +02:00
internal/datahttp 🎉 Big Bang! 2026-08-04 18:17:22 +02:00
lease Add site-local S3 supercluster federation 2026-08-21 21:56:55 +02:00
mds 💄 Rename OSD node identity throughout the stack 2026-08-09 16:50:53 +02:00
nbd 🛡 Harden sparse I/O and background maintenance 2026-09-01 22:28:07 +02:00
nvmeipc ️ storage: optimize block I/O and harden NVMe/TCP tooling 2026-09-02 18:01:54 +02:00
objectstore Add safe S3 storage-class retirement and detach 2026-09-05 23:53:33 +02:00
osd ️ storage: optimize block I/O and harden NVMe/TCP tooling 2026-09-02 18:01:54 +02:00
placement 🪣 Complete the replicated S3 data plane and cross-site replication 2026-09-01 18:31:12 +02:00
replication 🎉 Big Bang! 2026-08-04 18:17:22 +02:00
s3events 🪣 Complete the replicated S3 data plane and cross-site replication 2026-09-01 18:31:12 +02:00
s3gateway 🧪 Qualify storage-class retirement across gateway takeover 2026-09-06 00:15:27 +02:00
scripts (federation): add operable three-site S3 supercluster 2026-09-03 23:53:09 +02:00
snapshot 🎉 Big Bang! 2026-08-04 18:17:22 +02:00
spdk 🚚 organize repository documentation and tooling 2026-09-02 22:49:33 +02:00
storage ️ storage: optimize block I/O and harden NVMe/TCP tooling 2026-09-02 18:01:54 +02:00
systemd unify operations and add safe resource lifecycle 2026-08-08 16:21:44 +02:00
volume ️ storage: optimize block I/O and harden NVMe/TCP tooling 2026-09-02 18:01:54 +02:00
.dockerignore 🎨 simplify cluster operations and deployment 2026-08-05 00:07:53 +02:00
.env.example 🎨 simplify cluster operations and deployment 2026-08-05 00:07:53 +02:00
.gitignore Add versioned release and install workflow 2026-09-02 21:09:29 +02:00
AGENTS.md 🚚 organize repository documentation and tooling 2026-09-02 22:49:33 +02:00
Containerfile 🎨 simplify cluster operations and deployment 2026-08-05 00:07:53 +02:00
go.mod 🎨 Split network planes and improve operator workflows 2026-08-09 00:35:19 +02:00
go.sum 🎨 Split network planes and improve operator workflows 2026-08-09 00:35:19 +02:00
LICENSE.md 📄 License Laniakea under AGPL-3.0-only 2026-09-02 19:29:25 +02:00
Makefile 🧪 Qualify online storage lifecycle under S3 traffic 2026-09-06 12:20:33 +02:00
README.md 📝 Replace ASCII diagrams with SVGs 2026-09-04 01:31:15 +02:00

Laniakea — Distributed storage. Limitless scale.

Laniakea turns a group of storage devices into block volumes, shared filesystems, and S3-compatible object storage. It is designed for self-hosted clusters that need explicit durability, predictable failure handling, and the option to keep S3 data at more than one geographic site.

Warning

Laniakea is experimental and has not published a stable release. Its protocols and on-disk format may still change without compatibility shims. Use disposable data while evaluating it.

At a glance

Applications can use the same cluster in several ways:

Storage service What a client sees Typical use Current durability
Block An NVMe/TCP or NBD disk Virtual machines, databases, filesystems Replication
Shared filesystem A FUSE mount Shared directories and ordinary file access Replication
Object storage An S3-compatible endpoint Backups, archives, applications, data platforms Replication or erasure coding
Kubo/IPFS profile An S3-backed /blocks datastore Durable immutable IPFS blocks Replication or erasure coding
S3 federation A local S3 endpoint backed by multiple sites Geographic copies and geo-aware write acknowledgement Independent site durability

These are separate frontends over the same storage foundation. S3 is not implemented as files on the shared filesystem, and neither S3 nor filesystem payloads are stored inside NATS.

How it works

At a high level, clients talk to a frontend, and that frontend reads or writes the storage daemons that own the data:

Block, filesystem, and S3 clients reach gateways over shared placement pools backed by OSDs. Filesystem clients use the MDS for metadata only while file data goes straight to storage. A site-local NATS JetStream control plane holds state, leases, and fences without carrying user payload data, and an optional Core-NATS overlay federates S3 to peer sites.

The main pieces are:

  • An OSD is a storage daemon responsible for one formatted device.
  • A pool describes how data is placed and protected across eligible OSDs.
  • A gateway presents a client protocol such as NVMe/TCP, NBD, or S3.
  • An MDS coordinates filesystem metadata while file data flows directly to storage.
  • A controller applies cluster changes and coordinates maintenance.
  • NATS JetStream is the site-local source of truth for cluster state, leases, audit records, and resumable progress.
  • A fence is a generation number that prevents an old process from continuing to write after ownership has moved elsewhere.

One Laniakea cluster belongs to one site-local NATS cluster. A separate Core-NATS overlay can connect several independent sites for S3 federation without extending JetStream consensus across the WAN.

What Laniakea is designed to guarantee

  • Acknowledged writes satisfy the durability policy selected for their pool.
  • Only the current fenced owner may mutate a volume or namespace partition.
  • Checksums detect corrupt metadata, chunks, and erasure-coded fragments.
  • Reads, repair, scrub, recovery, replacement, and garbage collection fail closed instead of inventing data.
  • Placement can keep copies or fragments in different devices, hosts, racks, or zones.
  • Maintenance work is bounded, observable, restartable, and safe to retry.
  • Device replacement and power-of-two placement-shard growth use staged, verified handoffs rather than an immediate global remap.
  • JetStream capacity is monitored and new control-plane mutations stop before reserved recovery headroom is consumed.

There are deliberate limits:

  • Block volumes and filesystem data are replicated; erasure coding currently protects immutable S3 payloads only.
  • NBD is useful for development and a VM pinned to one host, but an existing kernel NBD connection cannot move to another gateway. Use NVMe/TCP multipath when the client must survive gateway failover.
  • A verified geographic S3 replica is read-only. Automatic home-site promotion and multi-writer object namespaces are not implemented.
  • A geo-active S3 policy makes covered writes depend on remote durability receipts, so WAN or destination failure can intentionally stop those writes.
  • Ordinary management routes are not authenticated. Keep them on loopback or a trusted management network protected by firewall policy.

The active roadmap and remaining release work are tracked in docs/ROADMAP.md.

Try the local lab

The quickest way to explore Laniakea is the disposable local lab. It creates six sparse image-backed OSDs and exposes a block volume, a shared filesystem, and an S3 service. It does not attach or mount them automatically.

You need Go 1.25 or newer, Make, Docker, curl, jq, and uuidgen. The first run may also build the pinned SPDK image. The S3 example below additionally uses the AWS CLI.

Watch the local lab walkthrough

make help
make lab

laniakea status --fail-on never
laniakea ls
laniakea df

The lab prints the commands for connecting NBD or NVMe/TCP, mounting the filesystem, and using its S3 credentials. For example:

source .local-laniakea/s3.env
aws --endpoint-url "$LANIAKEA_S3_ENDPOINT" s3 mb s3://demo
aws --endpoint-url "$LANIAKEA_S3_ENDPOINT" s3 cp README.md s3://demo/README.md
aws --endpoint-url "$LANIAKEA_S3_ENDPOINT" s3 ls s3://demo/

Clean up with:

make clean

Cleanup refuses to continue while a VM, NBD/NVMe connection, or mounted FUSE filesystem still depends on the lab. Disconnect the consumer normally and run the command again; do not force-detach live storage.

For a manual walkthrough, follow docs/GETTING-STARTED.md. docs/NBD.md continues from there to a raw /dev/nbdX suitable for a virtual-machine disk.

Build from source

go install ./cmd/laniakea
laniakea --help
laniakea version

Run focused package tests while developing. The complete host and federation qualification suites are intentionally separate because some build containers, create large sparse images, require host kernel facilities, or run for a long time.

go test ./cluster ./control ./placement
make help

make release runs the complete integration suite first. Only a successful run produces .build/linux-ARCH/laniakea, stamped with the tag-aware Git revision and a UTC build timestamp, stripped, and compressed with upx --best --lzma. ARCH defaults to go env GOARCH; set it explicitly to cross-build another Linux architecture. The packaging target requires UPX.

make install builds and packs the selected ARCH, then installs it as laniakea in the first GOPATH entry's bin directory. Override INSTALL_DIR to select another destination. A normal go install remains a dev build and reports the invocation time from laniakea version.

This convenience target does not replace the clean, exact-revision evidence, performance, and soak requirements described below.

Basic operator workflow

A production-shaped deployment starts with an existing three- or five-member NATS JetStream cluster and at least three Laniakea controllers. Each host uses one configuration file:

/etc/laniakea/<cluster>.toml

Select it once for the current shell:

export LANIAKEA_CONFIG=/etc/laniakea/production.toml
laniakea status --fail-on never

1. Initialize the site-local authority

laniakea admin cluster init --name production --replicas 3

This creates the bounded JetStream streams and key-value buckets used for cluster state. Size those resources together with the NATS account and server storage budgets before admitting production data.

2. Provision and admit storage

Provisioning formats the selected device and is destructive. Always use a stable /dev/disk/by-id/... path and verify the serial shown by the command.

sudo laniakea device provision /dev/disk/by-id/nvme-VENDOR_MODEL_SERIAL

laniakea admin device admit http://storage-01.example.net:8420 \
  --host storage-01 --rack rack-a --zone dc-a

The first command operates locally on the host that owns the device. The second records that running OSD and its physical failure-domain labels in the cluster. Repeat this for enough independent devices or hosts to satisfy the durability policy you intend to create.

3. Create storage by name

Create a replicated block volume:

laniakea admin pool create nvme --replicas 3 --failure-domain host
laniakea admin volume create database --pool nvme --size 8TiB

Create a shared filesystem and a replicated S3 service:

laniakea admin fs create projects --replicas 3 --failure-domain host
laniakea admin s3 create archive --replicas 3 --failure-domain host

On a topology with enough independent failure domains, preview and create a capacity-oriented S3 service with erasure-coded immutable payloads:

laniakea admin s3 create backups \
  --durability capacity --failure-domain host --plan

laniakea admin s3 create backups \
  --durability capacity --failure-domain host

Creation commands are idempotent: retrying the same request converges on the same derived IDs and policy. A same-named request with different geometry fails rather than silently changing existing storage.

See docs/CLUSTER.md for the full deployment and operations guide and docs/SYSTEMD.md for service installation.

Observe and manage a cluster

The everyday command surface is split deliberately:

  • Top-level commands inspect state and do not mutate the cluster.
  • laniakea admin ... submits audited changes.
  • laniakea device provision is the guarded host-local media operation.
  • The hidden laniakea service ... tree is for systemd and controlled test environments, not normal administration.

Common read-only commands are:

Command Answers
laniakea status Can the cluster safely serve data?
laniakea ls Which devices, pools, volumes, filesystems, and S3 stores exist?
laniakea df How much physical and shared logical capacity is available?
laniakea device status DEVICE Why may this device receive—or not receive—data?
laniakea pool status NAME How is this pool protected and placed?
laniakea pool shard ls --state not-clean Which placement shards need attention?
laniakea maintenance status Which repair, movement, scrub, or cleanup jobs are active?
laniakea federation status Which S3 stores have geographic policy, and in what phase?

Inventory and capacity commands accept --json. Status, inventory, and capacity views also support --watch or -w for an interactive two-second refresh.

Capacity needs careful interpretation. Volumes are thin-provisioned, and pools draw from shared devices. Therefore a pool's available capacity is an estimate, not a reservation, and availability from several pool rows must not be added together. device df is the physical view; pool df and volume df explain the logical view.

Maintenance and lifecycle

Laniakea exposes maintenance as resumable cluster work rather than a command that must remain attached to one terminal. Operators can:

  • recover missing replicated chunks and misplaced fragments;
  • scrub metadata and payload integrity;
  • reclaim unreachable data through certified garbage collection;
  • add, relabel, reweight, drain, replace, decommission, and finally purge a device identity;
  • double a pool's placement-shard count online; and
  • migrate standalone block volumes between replicated pools.

Before changing topology, inspect laniakea maintenance status. Follow the dedicated replacement, pool resize, and erasure-coded recovery runbooks for the required preconditions and exit checks.

S3 and geographic federation

Laniakea's S3 service has its own ordered object namespace and immutable payload representation. Its implemented profile includes SigV4, multipart uploads, versioning, Object Lock, coherent snapshots and restore, quotas, storage classes, lifecycle, notifications, replication, compression, and replicated or erasure-coded payloads. The precise supported API—not a vague compatibility percentage—is generated in docs/S3-COMPATIBILITY.md.

Federation joins otherwise independent Laniakea sites:

Independent Laniakea sites each keep their own JetStream authority, S3 gateway, and OSDs. A federator per site joins a shared Core-NATS overlay across the WAN that carries signed envelopes, bounded transfers, and durability receipts but no JetStream consensus. One site is the writable home; verified target sites serve read-only GET and HEAD.

Attaching a federator is passive and does not interrupt local I/O or move data. An operator enrolls an S3 store through explicit phases:

A federated S3 store advances local, seeding, verifying, geo-ready, geo-active. Work before activation can be cancelled straight back to local. An active policy must first be suspended with an explicit reduced-durability acknowledgement, then retired back to local.

  • geo-ready means the destination has verified data and may serve read-only S3 traffic.
  • geo-active means covered home-site mutations return success only after the configured independent sites have supplied durability receipts.

Pre-activation work can be cancelled. An active policy must first be suspended with an explicit reduced-durability acknowledgement, then retired to return to local operation. Only a local policy can be reconfigured or detached.

Replica endpoints remain read-only, and Laniakea does not automatically change DNS, promote a new home site, or create a multi-writer namespace. See the federation guide for the operating model and lifecycle, then the implementation record and security boundary for deeper detail.

To explore the full three-site path locally, make supercluster/s3-up creates three OSDs and one S3 endpoint per site. make supercluster/s3-ready enables verified geo reads; make supercluster/s3-activate separately strengthens US writes to require geographic receipts. The fixture ports, public development credentials, persistence behavior, and smoke commands are documented in its operator README. make supercluster/s3-e2e runs isolated, sustained geo-active traffic across failover and WAN faults. It also checks queue drain, recovery latency, and container memory without taking over the stable development fixture's ports.

Verification and project status

The repository contains fast package tests plus opt-in qualification for real OSD paths, NVMe/TCP multipath, S3 clients, erasure coding, federation, rolling upgrades, recovery, corruption, and resource exhaustion. Use make help to see the available targets and their scope.

Passing development tests does not make a release. Replicated S3 has a 15-gate, exact-revision evidence contract; long-running soak, performance, and comparison evidence remains release work. The EC release handoff begins only after that replicated contract passes. See docs/S3-RELEASE-QUALIFICATION.md and docs/ROADMAP.md for the current boundary.

Documentation map

If you want to… Read…
Build a disposable cluster by hand Getting started
Design or operate a real cluster Cluster deployment
Attach a block volume through NBD NBD guide
Run services under systemd systemd guide
Configure every daemon and network plane Configuration and network planes
Use the native S3 service S3 guide
Understand the supported S3 API S3 compatibility profile
Operate erasure-coded S3 data EC operations
Understand the EC design Erasure coding
Store Kubo/IPFS blocks Kubo/IPFS guide
Understand or operate multi-site federation Federation guide
Study the federation protocol and implementation Supercluster implementation record
Review architectural decisions ADR index
See current priorities and deferrals Roadmap
Run performance harnesses Performance guide
Work on the SPDK bridge SPDK guide

License

Laniakea is licensed under the GNU Affero General Public License, version 3 only (AGPL-3.0-only).