storage: add automatic disk discovery - #522
Open
Jordan Olshevski (jveski) wants to merge 6 commits into
Open
Conversation
Jordan Olshevski (jveski)
commented
Jul 21, 2026
Contributor
- discover safe NVMe namespaces when disks are not explicitly configured
- exclude mounted, swap-backed, held, denied, and unverifiable devices
- fall back to a configurable file-backed disk when no eligible device exists
- preserve explicit and supervisor-allocated disk configurations
- document automatic disk selection and fallback behavior
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces automatic disk selection for unbounded-storage when no explicit disks are configured, shifting the “default disk” behavior from the Go supervisor into the Rust daemon so the daemon can safely discover unused NVMe namespaces and fall back to a file-backed disk when none are eligible.
Changes:
- Add a new
disk_discoveryconfiguration surface (protobuf + Rust config defaults/validation) and implement safe NVMe namespace discovery with exclusions (mounted, swap, holders/device-mapper, denied, unverifiable). - Update the daemon startup + reload path to resolve disks before projecting runtime state, and adjust CPU core planning to pin storage cores per resolved concrete block disks.
- Update the Go storage supervisor to preserve explicit/allocated disks, otherwise pass an empty disk list (and optionally only a fallback size override) through to the daemon; update deployment/docs accordingly.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/storagesupervisor/render.go | Updates documentation/comments to reflect that empty disk lists are now intentional for daemon-side discovery. |
| internal/storagesupervisor/render_test.go | Adjusts tests to expect empty disks[] and (when annotated) disk_discovery.fallback sizing instead of supervisor-injected file disks. |
| internal/storagesupervisor/disks.go | Stops injecting a default file disk; preserves explicit/allocated disks and only overlays fallback size annotation onto disk_discovery when applicable. |
| deploy/unbounded-storage-supervisor/02-configmap.yaml.tmpl | Documents automatic disk discovery, denied paths, and fallback behavior (including legacy size annotation behavior). |
| cmd/unbounded-storage/src/topology/cores.rs | Adds for_host_with_storage to size storage cores based on concrete resolved block disks (not just NVMe controllers). |
| cmd/unbounded-storage/src/main.rs | Resolves disk set (explicit/automatic/fallback) before runtime projection and on reload; logs resolution; plans storage cores using resolved disk NUMA hints. |
| cmd/unbounded-storage/src/lib.rs | Exposes the new disk_discovery module. |
| cmd/unbounded-storage/src/disk_discovery.rs | Implements safe NVMe namespace discovery, disk materialization, caching, and related unit tests. |
| cmd/unbounded-storage/src/config/schema.rs | Adds defaults for disk_discovery fallback path/size and exposes a disk_discovery() accessor. |
| cmd/unbounded-storage/src/config/mod.rs | Re-exports DiskDiscoveryCfg from the config schema module. |
| cmd/unbounded-storage/src/config/load.rs | Validates disk_discovery denied paths and fallback file disk shape; adds related loader tests. |
| cmd/unbounded-storage/README.md | Documents automatic disk discovery configuration and runtime behavior (caching, pinning implications). |
| cmd/unbounded-storage/build.rs | Includes DiskDiscoveryCfg in schema generation. |
| cmd/unbounded-storage/ARCHITECTURE.md | Updates architecture docs to describe disk resolution/discovery in startup and core planning. |
| api/unbounded-storage/config.proto | Adds DiskDiscoveryCfg message and Config.disk_discovery field. |
| api/unbounded-storage/config.pb.go | Regenerates Go protobuf bindings for the new disk_discovery field/message. |
Files not reviewed (1)
- api/unbounded-storage/config.pb.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Jordan Olshevski (jveski)
marked this pull request as ready for review
July 22, 2026 16:14
Jordan Olshevski (jveski)
enabled auto-merge
July 22, 2026 16:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.