Skip to content

storage pool maintenance #14793

Open
Open

Description

@ingox

Discussed in #12189

Originally posted by ingox December 4, 2025
Hey all,

no 1:
In the procedure of deleting a primary storage I'd like to disable a primary storage as a first step to avoid further deployments.
As a next step I'd like to put the storage in maintenance. That is not possible as long as it's disabled. Is there any reason for that? The option is not available in the UI and cmk gives an error. You can enable maintenance while pool is enabled only.

no 2:
One additional topic I noticed. Once you put a primary storage in maintenance it will shutdown all the VMs which are still using this storage. The volumes are not migrated off to other storage. In the case I leave the maintenance again all the VMs get started again but also the volumes will be migrated off to a different storage. Why now?

I tested with ACS 4.21; XCP-ng; NFS

Did anyone else experience this?
Best regards,
Ingo

Activity

  1. jmsperu commented on Nov 30, 2026

    @jmsperu
    Collaborator

    I had a look at the first point (a disabled pool cannot be put in maintenance) and would like to send a fix, but one behaviour needs a decision first.

    Where the limit is today:

    • StorageManagerImpl.preparePrimaryStorageForMaintenance() accepts the pool only in Up or ErrorInMaintenance.
    • The UI shows the "Enable maintenance mode" action only for Up, Connecting, Down and ErrorInMaintenance (ui/src/config/section/infra/primaryStorages.js).

    Accepting Disabled in both places is a small change. The open question is what happens on cancel: PrimaryDataStoreHelper.cancelMaintain() always sets the pool to Up, so a pool that was disabled before maintenance would come back enabled and start taking new volumes again. For someone who disabled the pool on the way to removing it, that is a surprise.

    Options:

    1. Remember that the pool was disabled before maintenance (a storage pool detail) and return it to Disabled on cancel. Needs a little more code, but the operator gets back what they had.
    2. Keep cancel as it is (always Up) and document it.

    I would go with option 1. I would also check that maintenance works when the hosts no longer have the pool mounted (mount.disabled.storage.pool = false).

    Is option 1 acceptable? If so I will prepare the PR against main.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions