Repository navigation
Conversation
When Btrfs with default subvolumes is selected in suggest_lvm_layout(),
home_volume is set to False because @home is created as a subvolume on
the root logical volume.
However, suggest_lvm_layout() unconditionally sized root_vol using
process_root_partition_size() (capped at 20-50 GiB) and discarded
home_vol_size, leaving the rest of the volume group unallocated. It also
set mountpoint=Path('/') on root_vol even when Btrfs subvolumes were
used, and DiskLayoutConfiguration.has_default_btrfs_vols() did not check
LVM volumes.
When home_volume is False, allocate total_vol_available to root_vol, set
mountpoint=None when using_subvolumes is True (matching
suggest_single_disk_layout()), and check LVM volumes in
has_default_btrfs_vols().
This branch has not been deployed
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.
PR Description:
When Btrfs with default subvolumes is selected in
suggest_lvm_layout(),home_volumeis set toFalsebecause@homeis created as a subvolume on therootlogical volume.However:
suggest_lvm_layout()unconditionally calculatedroot_vol_size = process_root_partition_size(total_vol_available, ...)(which caps the root volume at 20–50 GiB) and discardedhome_vol_size, leaving the rest of the LVM volume group unallocated.root_volwas assignedmountpoint=Path('/')even whenusing_subvolumeswasTrue(unlikesuggest_single_disk_layout(), which setsmountpoint=Path('/') if not using_subvolumes else None).DiskLayoutConfiguration.has_default_btrfs_vols()only checkedself.device_modificationspartitions and did not checkself.lvm_config.get_all_volumes(), preventing Btrfs snapshot options from being enabled on LVM + Btrfs subvolume layouts.This PR fixes all three issues and adds a unit test in
tests/test_lvm_btrfs_layout.py.Tests and Checks