-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve btrfs handling in custom partitioning #4812
Improve btrfs handling in custom partitioning #4812
Conversation
…158) When removing a btrfs subvolume, do not remove its empty parents which are also subvolumes (only empty parent volumes should be removed).
Do not accept btrfs volume returned by resolve_device blivet method if we are looking for a subvolume.
@vojtechtrefny can you please look at the PR ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me from what I can tell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I've opened an issue for Blivet to fix the btrfs subvolume resolution there:storaged-project/blivet#1134 rather than with this PR patch, but I don't want to block this PR on it. |
/kickstart-test --testtype smoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, code LGTM, I have only nitpicks.
@@ -299,6 +299,11 @@ def _parse_fstab(devicetree, chroot): | |||
if device is None: | |||
continue | |||
|
|||
# If a btrfs volume is found but a subvolume is expected, ignore the volume. | |||
if device.type == "btrfs volume" and "subvol=" in options: | |||
log.debug("subvolume from %s for %s not found", options, devspec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this too well, so sorry if I'm wrong, but... is it not found, or skipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A subvolume was not found (for example it had been removed by GUI action).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for these improvements!
The patches should improve the manipulation with btrfs subvolumes in GUI Custom partitioning as reported in https://bugzilla.redhat.com/show_bug.cgi?id=2186158.
One of the patches should fix removing of btrfs subvolumes:
Original (parent subvolume /root is removed incorrectly):
https://rvykydal.fedorapeople.org/btrfs/rhbz2186158/removing_parent_subvolume.webm
Patched:
https://rvykydal.fedorapeople.org/btrfs/rhbz2186158/preserving_parent_subvolume.webm
The other one fixes displaying btrfs subvolumes in Custom partitioning:
Original:
https://bugzilla.redhat.com/show_bug.cgi?id=2186158#c6
Patched:
https://rvykydal.fedorapeople.org/btrfs/rhbz2186158/remove_btrfs_home.webm
Although the patches don't solve btrfs volume reformatting, they should allow to reuse /home subvolume by mounting it, removing and adding root subvolume and reformatting other non-btrfs partitions as in:
https://rvykydal.fedorapeople.org/btrfs/rhbz2186158/reuse_home_by_removing_and_adding_btrfs_root.webm