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

osbuild: add support for LVM to GenBootupdDevicesMounts() #876

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Aug 26, 2024

This is required for bootc-image-builder to support LVM. It works by using the new vg_partition option to the org.osbuild.lvm2.lv device and use it when generating the bootc/bootupd mounts.

This way all mounts can come from the same underlying loop device and bootc/bootupd can install the bootloader there. See also osbuild/osbuild#1867

Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we break this down into multiple commits? At least 2, but possibly 3 (if tests are done separately):

  • Update of options in lv2_lv_device.go (with tests)
  • Changes to bootupd_stage.go for supporting LVM.

It's not really important, but might make it easier to follow the history.

pkg/osbuild/lvm2_lv_device.go Outdated Show resolved Hide resolved
pkg/osbuild/lvm2_lv_device.go Show resolved Hide resolved
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Two suggestions inline.

pkg/osbuild/bootupd_stage.go Show resolved Hide resolved
pkg/osbuild/bootupd_stage.go Outdated Show resolved Hide resolved
mvo5 added 2 commits August 26, 2024 16:17
Add support for the new `vg_partnum` parameter for the
`org.osbuild.lvm2.lv` devices. This allows to mount the logical
volume from a single underlying loop device which is required
for `bootc install to-filesystem/bootupd`.

See osbuild/osbuild#1867
This is required for `bootc-image-builder` to support LVM. It
works by using the new `vg_partition` option to the `org.osbuild.lvm2.lv`
device and use it when generating the bootc/bootupd mounts.

This way all mounts can come from the same underlying loop device
and bootc/bootupd can install the bootloader there. See also
osbuild/osbuild#1867
@mvo5 mvo5 force-pushed the osbuild-bootupdate-add-lvm-vg_partnum branch from c699a19 to 2f4478b Compare August 26, 2024 14:33
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@achilleas-k achilleas-k added this pull request to the merge queue Aug 27, 2024
Merged via the queue into osbuild:main with commit a39bdcc Aug 27, 2024
18 checks passed
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Aug 27, 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.

3 participants