Skip to content

Move application volumes to an additional disk with volumectl #8259

Open

Description

@DavidePrincipi

Since NethServer 8.7, an application volume can be placed on an additional disk, but only when the application is installed, restored or cloned. When an installed application grows and fills the root disk, the only way to move its data to a new disk is to clone the application and remove the old one, which takes a long time, needs twice the space, and changes the application name.

Proposed solution

Add a volumectl subcommand that moves the data of one volume of an installed application to another base path in two steps, sync and finalize, to keep the downtime short. For example (subcommand names to be aligned with the existing add-volume and remove-volume):

volumectl move-volume dovecot-data --for mail1 --target /mnt/disk00
volumectl move-volume dovecot-data --for mail1 --target /mnt/disk00 --finalize
  1. Sync copies the volume data to the target, while the application keeps running. It preserves ownership, permissions, SELinux labels and extended attributes, and shows progress, because the first copy can take hours. It can be repeated as many times as wanted: each run copies only what changed since the previous one.
  2. Finalize stops the application services, runs a last sync, recreates the volume at the new location, updates /etc/nethserver/volumes.conf so the assignment survives later operations, and starts the services again. It is the only step with downtime, usually short when a sync ran just before.

The command also:

  • checks that the target base path exists and has enough free space for the volume data
  • leaves the original data untouched until finalize completes, and can move a volume back to the root disk

Alternative solutions

  • Clone the application to the same node, choosing the additional disk, then remove the original: works today, but changes the application name and needs twice the space.
  • A UI action: can come later, once the command is reliable.

Additional context

The admin manual must describe the procedure, including when to run the sync steps and the expected downtime of finalize. The draft "Disk usage and size of applications" would help choose which volume to move.

See also

Activity

  1. converted this from a draft issue on Oct 21, 2026
  2. changed the title [-]Move named volume data to a new disk[/-] [+]Move application volumes to an additional disk with volumectl[/+] on Oct 21, 2026
  3. moved this from Backlog to ToDo in NethServeron Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    milestone goal 👑This describes an announced milestone goal

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions