Storage
The Nexus storage stack is designed around a single principle: the kernel passes sectors; it does not interpret them. All filesystem logic lives in userland services, isolated from the kernel by ION Rings and capability boundaries.
Components
- NexFS — The sovereign filesystem with content-addressable storage, DAG versioning, and a dual-axis design matrix
- Sovereign FSH — The filesystem hierarchy (/Cas, /Nexus, /Cell, /Bus, /Data) that replaces POSIX FHS
- Block Valve — The kernel's minimal storage interface
Design Philosophy
Traditional operating systems embed filesystem logic in the kernel. This means a malformed disk image or a bug in ext4 can crash the entire system.
Nexus inverts this:
| Layer | Responsibility |
|---|---|
| Kernel (Block Valve) | Read/write sectors. That's it. |
| Userland (NexFS) | Parse superblocks, manage inodes, handle encryption, run CAS/DAG logic |
| Application | File open/read/write through Membrane POSIX shim or native ION channels |
If NexFS crashes, the kernel is unaffected. The storage fiber restarts, recovers state from ProvChain, and continues.
Storage Classes
NexFS uses a dual-axis design matrix:
Axis 1 — Storage Class (how much hardware you have):
| Class | Target | Example |
|---|---|---|
| Atom | Minimal flash/EEPROM | Mars rover sensor, IoT probe |
| Sovereign | Local disk | Laptop, NAS, home server |
| Archive | Cold storage | Backup vault, tape library |
Axis 2 — Network Scope (how connected you are):
| Scope | Connectivity | Feature Set |
|---|---|---|
| Local | Standalone | Core format only |
| Cluster | LAN peers | + CAS deduplication, CDC sync |
| Chapter | WAN federation | + DAG versioning, TimeWarp snapshots |
| Federation | Global mesh | + Economic incentives, vouch ceremonies |
The feature set scales up with both axes. An Atom/Local device runs the bare minimum format. A Sovereign/Federation device runs the full stack with CAS, CDC, DAG, TimeWarp, and economic incentives.
Build Flags
Storage features are controlled by compile-time flags:
nexfs_core # Base format (always included)
nexfs_sovereign # Sovereign extensions (CAS, CDC, DAG, TimeWarp)
nexfs_cluster # Cluster sync and peer discovery
nexfs_chapter # WAN federation
nexfs_federation # Full mesh with economicsThis ensures that a 256-byte sensor firmware doesn't carry DAG versioning code it will never use.