Skip to content

Block data mover design#9528

Open
Lyndon-Li wants to merge 5 commits intovmware-tanzu:mainfrom
Lyndon-Li:block-data-mover-design
Open

Block data mover design#9528
Lyndon-Li wants to merge 5 commits intovmware-tanzu:mainfrom
Lyndon-Li:block-data-mover-design

Conversation

@Lyndon-Li
Copy link
Contributor

Add block data mover design for block level incremental backup by integrating with Kubernetes CBT

Signed-off-by: Lyndon-Li <[email protected]>
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch from 21bb3c6 to 7f51017 Compare February 6, 2026 10:19
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.64%. Comparing base (556d582) to head (3218944).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9528      +/-   ##
==========================================
+ Coverage   60.54%   60.64%   +0.10%     
==========================================
  Files         386      387       +1     
  Lines       36370    36518     +148     
==========================================
+ Hits        22020    22148     +128     
- Misses      12770    12782      +12     
- Partials     1580     1588       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch 3 times, most recently from 6da6e2e to 5e50b9c Compare February 9, 2026 05:48
@Lyndon-Li Lyndon-Li requested a review from xing-yang February 9, 2026 05:57
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch 2 times, most recently from ad77963 to be777ed Compare February 10, 2026 09:44
Copy link
Collaborator

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current code deletes the VolumeSnapshot and VolumeSnapshotContent Kubernetes objects but retains the underlying storage snapshot. This means:

  • The CSI snapshot handle is only stored in DataUpload.Status.SnapshotID
  • There's no VolumeSnapshotContent object in the cluster pointing to the retained snapshot
  • To use it as base_snapshot_id for CBT, the next backup needs to retrieve this handle from the Kopia repository metadata
  • If incrementalBackup5, 4, 3, 2, 1 all the way to the original initial full backup is deleted, will velero recreate VolumeSnapshotContent from each base_snapshot_id with RetentionPolicy: Delete, in order to trigger deletion in the underlying storage?

@Lyndon-Li
Copy link
Contributor Author

The current code deletes the VolumeSnapshot and VolumeSnapshotContent Kubernetes objects but retains the underlying storage snapshot. This means:

This is NOT true for either the existing file system data mover and the new block data mover. Both the VS/VSC and the underlying storage snapshot will be deleted after backup.

  • The CSI snapshot handle is only stored in DataUpload.Status.SnapshotID

If SnapshotID contains the ChangeID (this is the fact for many storages), then the answer is NO, as you see in the design doc, the ChangeID is also saved in the backup repository.

VolumeSnapshotContent from each base_snapshot_id with RetentionPolicy: Delete, in order to trigger deletion in the underlying storage?

As mentioned above, the backend storage snapshot is deleted at the first place when the backup completes.

@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch 2 times, most recently from 847fa0f to 4763ed4 Compare February 13, 2026 07:53
@Lyndon-Li
Copy link
Contributor Author

@shubham-pampattiwar @kaovilai
I have updated the design to address the questions during the community meeting. Let me know if I missed anything.

@Lyndon-Li Lyndon-Li requested a review from kaovilai February 13, 2026 07:55
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch from 4763ed4 to a8eaf9a Compare February 13, 2026 07:58
@kaovilai
Copy link
Collaborator

As mentioned above, the backend storage snapshot is deleted at the first place when the backup completes.

Have you tested if you delete backend storage snapshot when backup completes if GetMetadataDelta(base_snapshot_id,next) would work if base_snapshot_id is already deleted?

My understanding is GetMetadataDelta(base_snapshot_id, target_snapshot_id) needs both CSI snapshot IDs to be valid at the storage backend. The CSI driver must be able to compute the block-level diff between them. If the base snapshot has been deleted from the storage backend, this call fails.

@weshayutin weshayutin added this to OADP Feb 17, 2026
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch 2 times, most recently from ec44edc to 2506428 Compare February 24, 2026 07:59
Signed-off-by: Lyndon-Li <[email protected]>
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch from 2506428 to a230929 Compare February 24, 2026 15:17
@Lyndon-Li
Copy link
Contributor Author

@kaovilai

As mentioned above, the backend storage snapshot is deleted at the first place when the backup completes.

Have you tested if you delete backend storage snapshot when backup completes if GetMetadataDelta(base_snapshot_id,next) would work if base_snapshot_id is already deleted?

My understanding is GetMetadataDelta(base_snapshot_id, target_snapshot_id) needs both CSI snapshot IDs to be valid at the storage backend. The CSI driver must be able to compute the block-level diff between them. If the base snapshot has been deleted from the storage backend, this call fails.

That varies from storages. I have added a section about Volume Snapshot Retention in the design. But I don't think implementing the snapshot retention is a high priority, let's discuss it tomorrow.

@Lyndon-Li Lyndon-Li requested a review from kaovilai February 24, 2026 15:23
Signed-off-by: Lyndon-Li <[email protected]>
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch from c372a91 to 81029d6 Compare February 27, 2026 08:08
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch from 6a9af12 to 397e328 Compare March 3, 2026 07:03
Signed-off-by: Lyndon-Li <[email protected]>
@Lyndon-Li Lyndon-Li force-pushed the block-data-mover-design branch from 397e328 to 3218944 Compare March 4, 2026 05:33
@Lyndon-Li Lyndon-Li requested a review from kaovilai March 4, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants