Merge "Editing follow-up for UEFI Software RAID support"
This commit is contained in:
commit
bdc5e9448d
@ -387,6 +387,7 @@ def _prepare_boot_partitions_for_softraid(device, holders, efi_part,
|
||||
if efi_part:
|
||||
efi_part = '{}p{}'.format(device, efi_part)
|
||||
|
||||
LOG.info("Creating EFI partitions on software RAID holder disks")
|
||||
# We know that we kept this space when configuring raid,see
|
||||
# hardware.GenericHardwareManager.create_configuration.
|
||||
# We could also directly get the EFI partition size.
|
||||
@ -414,11 +415,11 @@ def _prepare_boot_partitions_for_softraid(device, holders, efi_part,
|
||||
|
||||
target_part = target_part.splitlines()[-1].split(':', 1)[0]
|
||||
|
||||
LOG.debug("Efi partition %s created on disk holder %s",
|
||||
LOG.debug("EFI partition %s created on holder disk %s",
|
||||
target_part, holder)
|
||||
|
||||
if efi_part:
|
||||
LOG.debug("Relocating efi %s to holder part %s", efi_part,
|
||||
LOG.debug("Relocating EFI %s to holder part %s", efi_part,
|
||||
target_part)
|
||||
# Blockdev copy
|
||||
utils.execute("cp", efi_part, target_part)
|
||||
@ -710,6 +711,7 @@ class ImageExtension(base.BaseAgentExtension):
|
||||
device = hardware.dispatch_to_managers('get_os_install_device')
|
||||
iscsi.clean_up(device)
|
||||
boot = hardware.dispatch_to_managers('get_boot_info')
|
||||
# FIXME(arne_wiebalck): make software RAID work with efibootmgr
|
||||
if (boot.current_boot_mode == 'uefi'
|
||||
and not hardware.is_md_device(device)):
|
||||
has_efibootmgr = True
|
||||
|
@ -1570,10 +1570,11 @@ class GenericHardwareManager(HardwareManager):
|
||||
# 1. Create boot partitions in prevision
|
||||
# 2. Just leave space
|
||||
# 3. Do nothing: rely on the caller to specify target_raid_config
|
||||
# correctly according to what they intend to do (eg not set MAX if
|
||||
# they know they will need some space for bios boot or efi parts.
|
||||
# (Best option imo, if we accept that the target volume granularity
|
||||
# is GiB, so you lose up to 1GiB just for a bios boot partition...)
|
||||
# correctly according to what they intend to do (e.g. not set MAX
|
||||
# if they know they will need some space for bios boot or efi
|
||||
# parts). Best option imo, if we accept that the target volume
|
||||
# granularity is GiB, so you lose up to 1GiB just for a bios boot
|
||||
# partition...
|
||||
if target_boot_mode == 'uefi':
|
||||
# Leave 129MiB - start_sector s for the esp (approx 128MiB)
|
||||
# NOTE: any image efi partition is expected to be less
|
||||
|
@ -1,12 +1,12 @@
|
||||
---
|
||||
features:
|
||||
|
|
||||
- Adds UEFI boot support for Software RAID, and for partition table
|
||||
- |
|
||||
Adds UEFI boot support for Software RAID, and for partition table
|
||||
creation based upon boot mode in use.
|
||||
upgrade:
|
||||
|
|
||||
- The type of the partition table created for Software RAID is now based
|
||||
- |
|
||||
The type of the partition table created for Software RAID is now based
|
||||
upon the boot mode in use (GPT for UEFI or if explicitly passed via the
|
||||
instance's capabilities or the node's properties, otherwise MSDOS).
|
||||
- The amount of reserved space on the drives now also depends on the boot
|
||||
The amount of reserved space on the drives now also depends on the boot
|
||||
mode (128MiB for UEFI/GPT, 8MiB for BIOS/GPT, and one sector otherwise).
|
Loading…
Reference in New Issue
Block a user