Skip to content

Assign volume to additional disk - #978

Merged
DavidePrincipi merged 4 commits into
mainfrom
feat-7665
Nov 13, 2025
Merged

DavidePrincipi merged 4 commits into
mainfrom
feat-7665

Conversation

@DavidePrincipi

Copy link
Copy Markdown
Member
  • Extend add-module, clone-module, restore-module actions with optional attribute volumes.
  • Configure default assignments with optional configuration file /etc/nethserver/volumes.conf.
  • Helper command volumectl to manage volumes.conf contents and list available disks.
  • Developer documentation for Volumes.

Refs NethServer/dev#7665

github-actions Bot pushed a commit that referenced this pull request Nov 11, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements volume assignment to additional disks, allowing application data to be stored on separate filesystems. The implementation extends module installation, cloning, and restoration actions with optional volume mapping, provides a configuration file for default assignments, and includes a helper command to manage these settings.

Key Changes:

  • Added optional volumes parameter to add-module, clone-module, and restore-module actions for explicit volume-to-mountpoint mappings
  • Implemented /etc/nethserver/volumes.conf configuration file for default volume assignments per application type
  • Created volumectl command-line tool to manage volume configurations and list available disks

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/modules/volumes.md New documentation explaining volume types, assignment to additional disks, and volumectl usage
docs/modules/images.md Added reference to new org.nethserver.volumes label
core/imageroot/var/lib/nethserver/node/actions/list-mountpoints/validate-output.json JSON schema for list-mountpoints action output
core/imageroot/var/lib/nethserver/node/actions/list-mountpoints/50list_mountpoints Implementation of list-mountpoints action
core/imageroot/var/lib/nethserver/node/actions/add-module/validate-input.json Extended schema with volumes parameter
core/imageroot/var/lib/nethserver/node/actions/add-module/50update Creates base paths for module volumes during installation
core/imageroot/var/lib/nethserver/cluster/actions/restore-module/validate-input.json Extended schema with volumes parameter
core/imageroot/var/lib/nethserver/cluster/actions/restore-module/50restore_module Passes volumes parameter to add-module action
core/imageroot/var/lib/nethserver/cluster/actions/clone-module/validate-input.json Extended schema with volumes parameter
core/imageroot/var/lib/nethserver/cluster/actions/clone-module/50clone_module Passes volumes parameter to add-module action
core/imageroot/var/lib/nethserver/cluster/actions/add-module/validate-input.json Extended schema with volumes parameter
core/imageroot/var/lib/nethserver/cluster/actions/add-module/50update Validates mountpoint paths and passes volumes to node add-module action
core/imageroot/usr/local/bin/volumectl CLI tool for managing volumes.conf and listing available disks
core/imageroot/usr/local/agent/pypkg/agent/volumes.py Core volume management library with configuration parsing and mountpoint detection
core/imageroot/usr/local/agent/actions/create-module/validate-input.json Extended schema with volumes parameter
core/imageroot/usr/local/agent/actions/create-module/05pullimages Removed duplicated set_weight call
core/imageroot/usr/local/agent/actions/create-module/05create_volumes Creates podman volumes with bind mounts to configured paths
core/imageroot/etc/profile.d/volumectl.sh Bash completion for volumectl command

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/modules/images.md Resolved
Comment thread core/imageroot/usr/local/bin/volumectl Resolved
Comment thread docs/modules/volumes.md Resolved
github-actions Bot pushed a commit that referenced this pull request Nov 12, 2025
- Read default additional directories from optional config file
  /etc/nethserver/volumes.conf

- Pass volumes configuration to cluster/add-module action and validate
  it.

- Pass volumes configuration to cluster/clone-module and
  cluster/restore-module actions.

- Pre-create additional directories for application volumes in node's
  add-module.

- Pre-create application volumes during create-module, with volume bind
  mount to additional directories.

- Implement node's list-mountpoints action.
Configure custom volume mappings to local filesystem mountpoints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants