fix(core/disk): skip unmountable partitions when listing backup targets#3237
Merged
Conversation
The backup-target list flattens disks into one row per partition, so small non-data partitions on a backup disk (GPT header, ESP, etc.) were surfacing as "Available for backup, 0 GB" alongside the real data partition. part_info now returns Option<PartitionInfo>, returning None when the read-only mount probe fails; list() filters those out. The OS-disk LVM-PV path is restructured to call get_capacity directly, since raw PVs can't mount and we only needed logicalname + capacity there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
|
Just because we know the capacity of an LVM PV doesn't mean it has a mountable filesystem on it |
Address review feedback: the previous patch required all partitions on an external disk to mount before being added to disk.partitions, which dropped LVM physical volumes (no mountable filesystem on a raw PV). That broke setup/recovery flows like os_install scanning for EMBASSY_/STARTOS_ GUIDs in disk.partitions. Pull the LVM-PV logic from both branches of list() into a single lvm_pv_part_info helper that builds a PartitionInfo from capacity + guid + probed LV filesystem without going through the mount probe. The non-PV path still requires mount and skips on failure, which is what filters the tiny header/ESP partitions that started this thread. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
Good catch. The previous patch required every partition in the external-disk branch to mount before being added to Pushed |
dr-bonez
approved these changes
May 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
part_infonow returnsOption<PartitionInfo>, returningNonewhen the read-only mount probe fails;list()filters those out.list()is restructured to compute capacity directly viaget_capacityrather than going throughpart_info— raw PVs can't mount anyway, and we only neededlogicalname+capacityon that branch. This keeps the existing behavior for the embassy data disk.disk.util.could-not-collect-usage-infois renamed/reworded todisk.util.skipping-unmountable-partitionto reflect the new "skip" semantic, across all 5 locales.🤖 Generated with Claude Code