Skip to content

fix(k8s): leave lost+found out of the volume move compare #7414

Done

Description

@dan-petty

Problem

devops k8s volume move --storage-class longhorn (#7382) compares the two sides with CONST_K8S_VOLUME_MOVE_DIGEST_SCRIPT, which counts every entry. A new volume of a class with an ext4 filesystem, such as longhorn, has the directory ./lost+found that mkfs makes. A local-path volume is a directory on the node and has none. So the destination has one entry more, the metadata digests differ, and the move stops at the compare and undoes its steps.

Evidence of 2026-11-27 on the homelab: a copy of a test claim from local-path to a new longhorn volume gave entries 2004 on the source and entries 2005 on the destination, with equal files, bytes and content digests. A path diff showed only ./lost+found on the destination. The live check of #7382 passed only because its first copy failed, and the retry empties /dst with find -delete, which also removed lost+found.

Change

The digest script leaves out the top-level ./lost+found on each side (find . -path ./lost+found -prune -o ... in each find). tar still copies a lost+found of the source.

Acceptance criteria

  • A failing test first: each find of the digest script prunes ./lost+found.
  • A live move of a test claim from local-path to longhorn, whose first copy passes, ends with equal digests.
  • devops ci checks pass.

Related: #7382, #7408.

Activity

  1. added
    type/bug
    scope/k8s
    source/agent
    status/new
    value/medium
    effort/low
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 27, 2026
  2. removed
    status/in-review
    owner/agent
    on Nov 27, 2026
  3. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-27 18:39 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/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions