volumes: separate shared volume storage from rootfs storage - #491
Open
runleveldev wants to merge 1 commit into
Open
runleveldev wants to merge 1 commit into
runleveldev wants to merge 1 commit into
Conversation
Root disks can live on thin-provisioned block storage (lvmthin/rbd/zfs) while persistent volumes need a path-backed shared filesystem (cephfs/nfs). Add an optional Node.sharedVolumeStorage used for the volumes root, falling back to volumeStorage when unset.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The single-agent deployment instructions do not support distinct per-node volume roots, and API coverage and localization remain incomplete.
Review effort: Balanced
Findings: 4
Open (4)
What changed in this PR
Separates persistent-volume storage from container root-disk storage while preserving backward-compatible fallback behavior.
Changes:
- Adds
sharedVolumeStorageacross the database, API, client, and documentation. - Routes persistent-volume path resolution and warnings through the new storage preference chain.
- Adds fallback and shared-storage resolution tests.
| File | Description |
|---|---|
mie-opensource-landing/docs/developers/database-schema.md |
Documents the new Node field. |
mie-opensource-landing/docs/admins/deploying-agents.md |
Updates agent volume-root setup. |
mie-opensource-landing/docs/admins/core-concepts/volumes.md |
Explains shared volume storage. |
mie-opensource-landing/docs/admins/core-concepts/nodes.md |
Documents separate storage settings. |
create-a-container/utils/volumes.js |
Implements the storage fallback chain. |
create-a-container/utils/__tests__/volumes.test.js |
Tests storage selection and resolution. |
create-a-container/routers/api/v1/nodes.js |
Accepts, returns, and validates the setting. |
create-a-container/openapi.v1.yaml |
Extends Node API schemas. |
create-a-container/models/node.js |
Adds the Sequelize model field. |
create-a-container/migrations/20261002000000-add-node-shared-volume-storage.js |
Adds the nullable database column. |
create-a-container/client/src/pages/nodes/NodeFormPage.tsx |
Adds the shared-storage form input. |
create-a-container/client/src/lib/types.ts |
Extends the client Node type. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+212
to
+216
| <Input | ||
| label="Shared volume storage" | ||
| placeholder="Defaults to root disk storage" | ||
| helperText="Path-backed shared filesystem (CephFS/NFS) for persistent volumes; volumes live under <path>/volumes" | ||
| {...register('sharedVolumeStorage')} |
| tlsVerify === '' || tlsVerify === null || tlsVerify === undefined ? null : tlsVerify === true || tlsVerify === 'true', | ||
| imageStorage: imageStorage || 'local', | ||
| volumeStorage: volumeStorage || 'local-lvm', | ||
| sharedVolumeStorage: sharedVolumeStorage ? String(sharedVolumeStorage).trim() || null : null, |
Comment on lines
+73
to
75
| | **Shared Volume Storage** | path-backed FS | *(root disk storage)* | Hosts persistent volumes under `<path>/volumes` | | ||
|
|
||
| If a configured storage does not support the required content type, the system falls back to the largest enabled storage on the node that does. If no storage supports the required content type, container creation fails. |
Comment on lines
+83
to
+84
| is the configured **path** of the node's **shared volume storage** (or the root | ||
| disk storage, if shared volume storage is unset) (e.g. a CephFS/NFS mount |
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.

Problem
Node.volumeStoragewas used for both container root filesystems (rootdir) and the persistent volumes root (#421). These need different semantics: rootfs is fine on thin-provisioned block storage (LVM-thin, Ceph RBD, ZFS), but volumes are bind-mount directories and require a path-backed shared filesystem (CephFS/NFS). With the defaultlocal-lvm, volume creation fails ("no host path"); switching to CephFS/NFS to make volumes work forces rootfs onto raw images on a shared FS.Change
Nodes.sharedVolumeStoragecolumn (migration + model).volumesStorageName(node)inutils/volumes.js:sharedVolumeStorage → volumeStorage → imageStorage → 'local'. Used byresolveVolumesRootand the node-savevolumeStorageWarnings.bin/create-container.js) is unchanged and still usesvolumeStorage.sharedVolumeStorage(blank → null); OpenAPI updated.Backward compatible: existing nodes have
sharedVolumeStorage = nulland behave exactly as before.Notes
volumeStoragekeeps its name; only the UI label changed.Testing
npx jest utils/__tests__/volumes.test.js routers/api/v1/__tests__/nodes*— 50 passed (new tests for the fallback chain and for preferring shared storage over block rootfs storage).middlewares/__tests__/mcp-proxy.test.jsfails onmainas well; unrelated.