mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-27 18:34:18 +00:00
Compare the existing PVC's capacity against the source volume size recorded in the backup volume info (#10506) before any side effect and skip the volume when it is too small, so the restore fails early instead of running out of space midway. For the block data mover the source size is the device size; for the file system data movers it is the logical size of the backed-up files, a lower bound since file system metadata is not accounted for. The file system path reads the size from the volume info already carried in RestoreData. The PVC CSI RIA has no access to the volume info, so the restore engine carries the size on the PVC item through a Velero-internal annotation, the same mechanism as the selected-node carrier; both carrier annotations are stripped before the item is created in the cluster. The check is skipped when the source size is unknown (backups taken before it was recorded) or the PVC's capacity is not reported. Signed-off-by: chlins <chlins.zhang@gmail.com>
2 lines
87 B
Plaintext
2 lines
87 B
Plaintext
Add in-place restore pre-flight check: PVC must be large enough for the backed-up data
|