Skip to content

allow smaller PVC templates when scaling vmstorage out #2822

Open

Description

@datamuc

Is your feature request related to a problem? Please describe

Summary

Allow VMCluster scale-out with smaller PVCs for new vmstorage replicas.

Use case

Let's say, I have three vmstorage replicas with 200Gi PVCs. To spread RAM and load across
more nodes, I want to scale to six replicas without increasing retained data.

New replicas need only 100Gi each. After one retention period, data will be
distributed over all six replicas. Using 200Gi for every new PVC would provision
900Gi total instead of the intended 600Gi: 300Gi unnecessarily.

Reproduction

  1. Create three vmstorage replicas with a 200Gi volumeClaimTemplate.
  2. Change the template to 100Gi and scale to six replicas.

Expected behavior

Keep the existing 200Gi PVCs unchanged and create 100Gi PVCs for new replicas.

Either treat smaller requests for existing PVCs as a no-op, or provide an
explicit option to permit heterogeneous PVC capacities during scale-out.

Actual behavior

The update fails because the operator tries to shrink existing PVCs:

cannot decrease PVC=... size from=200Gi to=100Gi, please check
VolumeClaimTemplate configuration: declined by the operator

Additional context

This behavior was introduced with #2512, which made
declined decreases fail reconciliation. I am not sure whether this should be a
bug report or a feature request. As a bug report, I would ask to revert #2512,
which I am fine with. Alternatively, an option for intentional heterogeneous
PVCs would be useful.

Describe the solution you'd like

See Additional context above

Describe alternatives you've considered

No response

Additional information

No response

Activity

  1. added
    enhancement
    on Nov 16, 2026
  2. f41gh7 commented on Nov 23, 2026

    @f41gh7
    Collaborator

    Looks like a bug to me. It's fine to have a bigger PVC due to manual change and it shoudn't block resource update.

  3. Shrinet82 commented on Nov 24, 2026

    @Shrinet82

    Hi @f41gh7, I'd like to pick this up.

    Plan: in modifyPVC (statefulset_pvc_expand.go), when the VolumeClaimTemplate asks for less than the existing PVC, keep the current size and log it instead of returning ErrDeclined. Metadata and volumeAttributesClass changes still get applied, and expansion works as before. New replicas then get the smaller template, which covers the scale-out case here. I'll add test cases and a CHANGELOG entry.

    One question: is a log line enough, or should the size mismatch still show up somewhere, like an event or status.reason?

    Could you assign it to me?

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions