-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backup/restore: fix import of volumes with small or unaligned size
Migrate from resize() followed by unspecified-size import_data() to the newer method import_data_with_size(), fixing two bugs. 1. When restoring a volume with a size that's smaller than the default, the resize step didn't attempt to shrink (and not all storage drivers would have supported it anyway), which caused the import step to fail with the message "not enough data": Fixes QubesOS/qubes-issues#7176 2. When restoring a volume with a size that's not divisible by 4 MiB (e.g. backed up from file-reflink), LVM Thin implicitly rounds up the resize to next multiple, which again caused the import step to fail in the same way: https://forum.qubes-os.org/t/backup-didnt-restore-private-volume/17874 (cherry picked from commit ba9b24d)
- Loading branch information
Showing
2 changed files
with
36 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters