Cannot deploy to mirrored EFI partitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Undecided
|
Unassigned | ||
curtin |
Fix Committed
|
Wishlist
|
Unassigned |
Bug Description
Hi,
On an fce deployment, I need to deploy a centos node that uses
sw raid for the OS. The configuration of the storage layout from
fce is:
centos-gpu:
disks:
- id: sda
disk: 0
type: disk
ptable: gpt
- id: sdb
disk: 1
type: disk
ptable: gpt
# Boot
- id: sda-part1
name: efi
device: sda
size: 100M
type: partition
number: 1
- id: sdb-part1
name: efi
device: sdb
size: 100M
type: partition
number: 2
- id: sda-part2
device: sda
size: 398800M
type: partition
number: 3
- id: sdb-part2
device: sdb
size: 398800M
type: partition
number: 4
- id: md0
name: md0
raidlevel: 1
type: raid
spare_
devices:
- sda-part1
- sdb-part1
- id: md0-format
volume: md0
label: boot
type: format
fstype: vfat
- id: md0-mount
device: md0-format
path: /boot/efi
type: mount
- id: md1
name: md1
raidlevel: 1
type: raid
spare_
devices:
- sda-part2
- sdb-part2
- id: md1-format
volume: md1
label: root
type: format
fstype: ext4
- id: md1-mount
device: md1-format
path: /
type: mount
Deploying the machine, everything looks to be correct, when it reaches the
point to reboot, only pxe interfaces are detected as boot devices, no boot
disk detected. Booting the node in rescue mode, and mounting the fs in mnt
the lsblk looks like:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 180.3M 0 loop /media/root-ro
sda 8:0 0 745.2G 0 disk
├─sda1 8:1 0 92M 0 part
│ └─md127 9:127 0 91M 0 raid1 /mnt/boot/efi
└─sda2 8:2 0 371.4G 0 part
└─md126 9:126 0 371.3G 0 raid1 /mnt
sdb 8:16 0 745.2G 0 disk
├─sdb1 8:17 0 92M 0 part
│ └─md127 9:127 0 91M 0 raid1 /mnt/boot/efi
└─sdb2 8:18 0 371.4G 0 part
└─md126 9:126 0 371.3G 0 raid1 /mnt
# ls /mnt/boot/grub2
fonts grub.cfg grubenv i386-pc locale
#
Curtin information will follow.
Thanks!
José.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Michael Hudson-Doyle: Approve
- Dan Watkins: Pending requested
-
Diff: 800 lines (+515/-27)11 files modifiedcurtin/block/schemas.py (+5/-0)
curtin/commands/apt_config.py (+1/-5)
curtin/commands/curthooks.py (+122/-12)
examples/tests/bcache-ceph-nvme-simple.yaml (+2/-2)
examples/tests/bcache-ceph-nvme.yaml (+2/-2)
examples/tests/mirrorboot-uefi.yaml (+17/-1)
examples/tests/reuse-raid-member-wipe-partition.yaml (+2/-0)
examples/tests/reuse-raid-member-wipe.yaml (+2/-1)
helpers/common (+11/-3)
tests/unittests/test_curthooks.py (+317/-1)
tests/vmtests/test_mdadm_bcache.py (+34/-0)
Hi,
I suspect that you're missing 'grub_device: true' on your two disks in the raid1 array.
Adjusting your config like so should work:
- id: sda
disk: 0
type: disk
ptable: gpt
grub_device: true
- id: sdb
disk: 1
type: disk
ptable: gpt
grub_device: true
An existing storage config for this scenario (MirrorbootUEFI) is here:
https:/ /git.launchpad. net/curtin/ tree/examples/ tests/mirrorboo t-uefi. yaml