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

btrfs improvements and fixes #2970

Merged
merged 1 commit into from
Dec 1, 2024
Merged

Conversation

mgziminsky
Copy link
Contributor

A few small fixes and improvements to btrfs partitioning to better support manual layouts.

  • Fix: Don't require subvolume mount points to exist on host system
  • Fix: Mount subvolumes in sorted order to properly support nesting
  • Enhance: Support deeply nested subvolume names as allowed by btrfs

Tests and Checks

  • I have tested the code!
    • Tested and verified in qemu using the example config below

Example Config

{
    "config_version": "3.0.1",
    "disk_config": {
        "config_type": "manual_partitioning",
        "device_modifications": [
            {
                "device": "/dev/sda",
                "partitions": [
                    {
                        "btrfs": [],
                        "dev_path": null,
                        "flags": [
                            "boot",
                            "esp"
                        ],
                        "fs_type": "fat32",
                        "mount_options": [],
                        "mountpoint": "/boot",
                        "obj_id": "415b73ac-e232-4dba-b5fa-04691ab05b1c",
                        "size": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "GiB",
                            "value": 1
                        },
                        "start": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "MiB",
                            "value": 1
                        },
                        "status": "create",
                        "type": "primary"
                    },
                    {
                        "btrfs": [
                            {
                                "mountpoint": "/var/log",
                                "name": "@log"
                            },
                            {
                                "mountpoint": "/var/cache",
                                "name": "@cache"
                            },
                            {
                                "mountpoint": "/",
                                "name": "@/live/snapshot"
                            },
                            {
                                "mountpoint": "/.snapshots",
                                "name": "@"
                            },
                            {
                                "mountpoint": "/home",
                                "name": "@home/live/snapshot"
                            },
                            {
                                "mountpoint": "/home/.snapshots",
                                "name": "@home"
                            }
                        ],
                        "dev_path": null,
                        "flags": [],
                        "fs_type": "btrfs",
                        "mount_options": [
                            "compress=zstd"
                        ],
                        "mountpoint": null,
                        "obj_id": "824a7f4e-29a3-4414-a425-e575ba8861d4",
                        "size": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "B",
                            "value": 33283899392
                        },
                        "start": {
                            "sector_size": {
                                "unit": "B",
                                "value": 512
                            },
                            "unit": "B",
                            "value": 1074790400
                        },
                        "status": "create",
                        "type": "primary"
                    }
                ],
                "wipe": true
            }
        ]
    },
    "version": "3.0.1"
}

@mgziminsky mgziminsky requested a review from Torxed as a code owner November 30, 2024 19:10
@svartkanin
Copy link
Collaborator

Thanks for the improvements

@svartkanin svartkanin merged commit 256f206 into archlinux:master Dec 1, 2024
8 checks passed
castillofrancodamian pushed a commit to castillofrancodamian/archinstall that referenced this pull request Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants