Skip to content
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

Update the subvolume menu - fix for #1278 #1297

Merged
merged 12 commits into from
Jun 6, 2022
Merged

Conversation

svartkanin
Copy link
Collaborator

Subvolume changes

Addresses issues

Changes

Introduce a new dataclass for Subvolumes

When storing subvolume information in the partition['btrfs']['subvolume'] dictionary container we no longer have to deal with native types but now have the class Subvolume that encapsulates the relevant information. This should alleviate possible bugs in the future.
With this change the relevant code parts have been updated as well (hopefully without any mistakes). As this change is also part of the configuration that can be saved/loaded that one also has been updated.

New configuration schema

The old configuration schema for disk layouts looked like this

"btrfs": {
                    "subvolumes": {
                        "@": "/",
                        "@.snapshots": "/.snapshots",
                        "@home": "/home",
                        "@log": "/var/log",
                        "@pkg": "/var/cache/pacman/pkg"
                    }
                },

this has now migrated to

 "btrfs": {
                    "subvolumes": [
                        {
                            "compress": false,
                            "mountpoint": "/",
                            "name": "@",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/home",
                            "name": "@home",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/var/log",
                            "name": "@log",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/var/cache/pacman/pkg",
                            "name": "@pkg",
                            "nodatacow": false
                        },
                        {
                            "compress": false,
                            "mountpoint": "/.snapshots",
                            "name": "@.snapshots",
                            "nodatacow": false
                        }
                    ]
                },

@Torxed This is backwards compatible similar to the user credential changes

New Subvolume menu

image

Future changes

@Torxed I know this is a big one, but I was hoping to get this out now so there's enough time to thoroughly test it before the next release :)

@svartkanin svartkanin requested a review from Torxed as a code owner June 2, 2022 12:27
@svartkanin
Copy link
Collaborator Author

Also fixes #1305

@svartkanin svartkanin changed the title Update the subvolume menu - #1278 Update the subvolume menu - fix for #1278 Jun 6, 2022
@Torxed
Copy link
Member

Torxed commented Jun 6, 2022

Awesome work. I don't mind them being huge hehe.
But I'm on vacation and a bit on the run, could I bother you with fixing the merge conflict with users.py? After that I can merge it!

@svartkanin
Copy link
Collaborator Author

@Torxed fixed the conflicts!
Ahh yeah that's right Sweden is essentially shut down now for 2 months ;) happy holidays!

@Torxed
Copy link
Member

Torxed commented Jun 6, 2022

@Torxed fixed the conflicts! Ahh yeah that's right Sweden is essentially shut down now for 2 months ;) happy holidays!

Haha, thanks! We sure are! Industrial holiday ftw, even if you're not in the industrial field. ^^

@Torxed Torxed merged commit a7ca037 into archlinux:master Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants