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

With custom layout required to run on another vty: lvresize and btrfs fs resize max #3044

Open
gwpl opened this issue Dec 23, 2024 · 0 comments

Comments

@gwpl
Copy link

gwpl commented Dec 23, 2024

Which ISO version are you using?

2024-07

The installation log

Not Applicable

describe the problem

LVM on Luks setup with btrfs, with CUSTOM BIG /boot ( to ensure that non of computers / users I install ArchLinux will run out of /boo space even if one will want to install multiple kernels etc ).

That's why I had to modify config by hand, as installation tool was making mistakes.

I attach full config in attachement to issue, and on bottom , summary of layout ( user_configuration_bootBig_main62GB.json ) generated by o1-preview.

What is the core of the issue is , that layout is mostly correct, just partitions are not resized.

I developed workaround that makes it work, that may help you to implement patch easily:

I am running on another vty or in background : during_installer.sh , that will :

  • monitor to get right moment when archinstall script created paritions
  • and as soon as they are created
  • hopefully before they get full (because are to small, it's race condition but in my case work) immediately resized them with lvresize and btrfs filesystem resize max

Therefore proper fix would probably do those to operations in installer when installing things.

In mean time here is my script that may help others and attached to issue config file for those who want custom big boo partition, encrypted luks on lvm with btrfs setup:

#!/bin/bash
# during_install.sh

# run during installer

echo WAITING for /mnt/archinstall to appear...; 
while ! df -h | grep /mnt/archinstall ; do sleep 0.5; done
sleep 1
echo "Resiging LVM and btrfs"

set -x
lvresize -L 32G /dev/SunnyVg/root
lvs
btrfs filesystem resize max /mnt/archinstall

For convenience here is o1-preview description of layout from attached file

(therefore may contain mistakes by o1-preview, but I suspect I may have overlooked something in json file when modyfing by hand - why? again, archlinux TUI was failing in allowing me to edit layout of encrypted luks over lvm with custom size of boot partition (1GiB in this case), so I did manual modification )

user_configuration_bootBig_main62GB.json

Partition Layout Description:

Layout is designed to be pretty universal, minimal, so after hopefully effortless installation, user can either create more partitions later, or grow created LVM and partitions according to with and resources.

The provided archinstall configuration specifies the following partition layout on /dev/sda:


Disk: /dev/sda (the entire disk is wiped before installation)

Partition 1 (/dev/sda1):

  • Type: Primary
  • Start: 3 MiB
  • Size: 1021 MiB
  • Filesystem: fat32
  • Mount Point: /boot
  • Flags: Boot

Partition 2 (/dev/sda2):

  • Type: Primary
  • Start: 1024 MiB
  • Size: 62 GiB
  • Filesystem: Intended for encryption (but also specified as btrfs in the config)
  • Mount Point: Not directly mounted
  • Encryption: Configured with LUKS (lvm_on_luks)
  • Contains:
    • LVM Physical Volume:
      • Volume Group: SunnyVg
      • Logical Volume:
        • Name: root
        • Size: 32 GiB
        • Filesystem: btrfs
        • Mount Point: /
        • Mount Options: compress=zstd
        • Btrfs Subvolumes:
          • @ mounted at /
          • @home mounted at /home
          • @log mounted at /var/log
          • @pkg mounted at /var/cache/pacman/pkg
          • @.snapshots mounted at /.snapshots

Btrfs Subvolumes:

  • Defined within the Logical Volume root:
    • @ mounted at /
    • @home mounted at /home
    • @log mounted at /var/log
    • @pkg mounted at /var/cache/pacman/pkg
    • @.snapshots mounted at /.snapshots
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

No branches or pull requests

1 participant