Question
Btrfs Snapshot Restore: Checksum Preservation and Verification
Mira Maple
0 reputation · 16 Jun 2020, 19:04 UTC
108.1K views0
Btrfs Snapshot Restore: Checksum Preservation and Verification
The goal is to determine whether restoring a Btrfs snapshot to a new pool preserves the original per‑file checksums or triggers recomputation, and how to confirm data integrity afterwards.
Constraints: The restore operation copies metadata and data blocks without running fsck, and the target filesystem may have different mount options (compress, dedup). There is uncertainty whether checksum mismatches can slip through if the source snapshot was already corrupted.
- Does the restore process recompute checksums for each file, or does it keep the checksums stored in the snapshot metadata?
- Can
btrfs check -sreliably detect checksum mismatches after a restore, especially when the snapshot was taken from a corrupted source? - What additional verification steps (e.g., byte‑by‑byte comparison, filesystem usage statistics) are recommended to ensure that the restored data matches the source?