Skip to content

feat(k8s): set the size of the new claim in volume move #7484

Description

@dan-petty

Problem

devops k8s volume move makes <claim>-move with the size of the old claim. A local-path volume does not limit its data to the size of its claim, but a class such as longhorn does. On 2026-11-27 the move of devops/roadmap-service-home (--storage-class longhorn --access-mode ReadWriteMany) failed with tar: ...: Cannot open: No space left on device: the source held 3,528,025,691 bytes in 313,327 entries, and the claim requests 1Gi. The move undid its steps. The claim in git can get a larger size, but the move takes the size of the live claim, and a bound local-path claim cannot grow.

Change

  • Add --size QUANTITY to devops k8s volume move: <claim>-move and the claim made again request that size. The plan refuses a size smaller than the size of the old claim.
  • --plan prints the size before and after the move.

Acceptance criteria

  • A failing test first: a plan with --size 10Gi makes both claims with resources.requests.storage: 10Gi.
  • A live move of a test claim whose data is larger than its request ends with equal digests.
  • devops ci checks pass.

Related: #7382, #7459, dan-petty/homelab#579.

Alternatives check of 2026-11-27: partly.
Tool: utkuozdemir/pv-migrate (https://github.com/utkuozdemir/pv-migrate), Apache-2.0, last activity 2026-11-26, maintained.
Reason: Searches surfaced pv-migrate, a maintained open tool that copies one claim's data into a destination claim it creates with a chosen storage class and access mode; it covers the move itself but not the size preview, the size guard, or the in-repo plan.

Covers:

  • Copies all data from one bound claim into a new claim
  • Creates the destination claim with a chosen storage class
  • Creates the destination claim with a chosen access mode
  • Cleans up the migration Job when the copy fails

Lacks:

  • No plan output of the claim size before and after
  • No refusal of a destination size smaller than the source
  • No in-repo subcommand, tests or git-managed claim re-creation
  • No check that both ends end with equal digests

Activity

  1. added
    type/feature
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 27, 2026
  2. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • pv-migrate destination claim capacity flag --dest-capacity, results: 5
    • migrate data between Kubernetes PVCs tool destination size storage class pv-migrate, results: 5
    • pv-migrate kubernetes pvc migration github, results: 5
    • kubectl plugin copy PVC data to larger volume new storage class, results: 5
    • pv-migrate, results: 5
    • kubernetes PVC migration rsync tool destination storage class access mode, results: 5
    • how to move kubernetes persistent volume claim data to a bigger claim, results: 5
    • utkuozdemir pv-migrate documentation destination capacity, results: 5
    • Velero Kasten volume clone PVC larger size alternative open source, results: 5
    • pv-migrate migrate command flags destination PVC size dest-capacity README, results: 5

    Sources:

  3. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 28, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 28, 2026
  5. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-28 02:40 UTC

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

    effort/lowpriority/p2-mediumscope/k8ssource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions