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

Support updating multiple EFIs in mirrored setups (RAID1) #813

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

HuijingHei
Copy link
Member

@HuijingHei HuijingHei commented Jan 9, 2025

Add blockdev.rs to parse block device


bios.rs: update some functions to use blockdev

  • Remove get_device()
  • Update get_bios_boot_partition() to use blockdev

The EFI System Partition is not mounted after booted, on systems
configured with boot device mirroring, there are independent EFI
partitions on each constituent disk, need to mount each disk and
updates. But skip updating BIOS in this case.

Xref to #132

Copy link

openshift-ci bot commented Jan 9, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@travier travier changed the title Support updating multiple EFIs in mirrored setups(RAID1) Support updating multiple EFIs in mirrored setups (RAID1) Jan 9, 2025
@travier
Copy link
Member

travier commented Jan 9, 2025

AFAIK, this is only for EFI setups and not BIOS ones. I don't know if we mirror the MBR as well for BIOS RAID setups in FCOS.

@HuijingHei
Copy link
Member Author

HuijingHei commented Jan 10, 2025

AFAIK, this is only for EFI setups and not BIOS ones.

I think you are right, let's skip BIOS first, can add it later if needed.

I don't know if we mirror the MBR as well for BIOS RAID setups in FCOS.

I think we support it. Run cosa run --qemu-image data/fedora-coreos-41.20241203.20.0-qemu.x86_64.qcow2 --add-disk 10G -B ign/mirror.bu -m 4096 (see doc for mirror.bu), vm booted successfully.

@travier
Copy link
Member

travier commented Jan 10, 2025

Acording to Hristo on the fcos channel, we do mirror the MBR for RAID mirror setups with BIOS. We can do that later as we mostly care about the UEFI case for now.

@HuijingHei HuijingHei force-pushed the multiple-efi branch 11 times, most recently from c4c6b1e to 33d1285 Compare January 16, 2025 13:29
@HuijingHei HuijingHei marked this pull request as ready for review January 16, 2025 13:35
@cgwalters
Copy link
Member

I only gave this a superficial skim, it seems sane (nice work!! and thank you for working on this!) but it's a big change and merits a deeper review. I will try to get some time.

In the intermediate time, can you split off the first two prep commits to a separate PR?

Update `get_bios_boot_partition()`:
- Return None if has multiple devices (currently not supported)
@HuijingHei HuijingHei marked this pull request as draft January 20, 2025 05:44
@HuijingHei
Copy link
Member Author

HuijingHei commented Jan 20, 2025

can you split off the first two prep commits to a separate PR?

Sure, the prep PR is #820, and will update this when the prep PR merged.

The EFI System Partition is not mounted after booted, on systems
configured with boot device mirroring, there are independent EFI
partitions on each constituent disk, need to mount each disk and
updates. But skip updating BIOS in this case.

Xref to coreos#132
@openshift-merge-robot
Copy link
Collaborator

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants