Make var and root filesystems LVM based

Move the /var and /root partition based filesystems into the cgts-vg so
that they can be resized as required at runtime in the future.

This change includes:
- Update pxeboot network personality files to add installer command line
  parameters inst_ostree_root andinst_ostree_var to allow specifying the
  root and var devices to be created and populated by the installer.
- Update the StarlingX grub.cfg file to add a new single option booting
  that drops the rollback boot option (not working) and adds grub
  options ostree_root, rd.lvm.lv, and ostree_var to enable mounting the
  root and var filesystems at boot time.
- Update the kickstart/miniboot config files to:
  - Remove support for lat/lat-disk partition size variables and
    refactor the hooks to use specific PART_SZ_* and LV_SZ_* variables.
  - Increase /boot partition size to 2GB from 500M to provide some
    additional space for future patching scenarios that may require
    staging multiple ostree deployments prior to reboot and cleanup.
  - Create logical volumes for root and var set to the current 20GB
    values.
  - Adjust the minimum physical volume size used on AIO and worker
    personalities to include the new root and var logical volumes.
  - Adjust normal install disk thresholds to 219GB for AIOs and 120GB
    for workers.
  - Fix mkfs hook to ensure that the aio vs. std sizes are correctly
    reflected on hook execution.

Test Plan:
- PASS: BIOS AIO-SX
- PASS: UEFI AIO-SX
- PASS: BIOS 2+2+2
- SKIP: secure boot, not ready for Stx8.0
- PASS: AIO-SX upgrade
- PASS: AIO-DX upgrade
- PASS: DC subcloud install (virtual test)

Change-Id: I5f77266336b53d178eaae0e6fbb556bbea6400e8
Depends-On: https://review.opendev.org/c/starlingx/integ/+/865076
Story: 2010444
Task: 46881
Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
Robert Church 2022-11-18 01:05:44 -06:00 committed by Dan Voiculeasa
parent 1132443626
commit c5c6f5353a
17 changed files with 379 additions and 335 deletions

View File

@ -22,5 +22,5 @@ LABEL 1
MENU LABEL Standard Controller
MENU DEFAULT
KERNEL rel-xxxSW_VERSIONxxx/bzImage-std
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=controller instname=debian instbr=starlingx instsh=0 instab=0 ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=controller instname=debian instbr=starlingx instsh=0 instab=0 inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
IPAPPEND 2

View File

@ -22,5 +22,5 @@ LABEL 1
MENU LABEL All-in-one
MENU DEFAULT
KERNEL rel-xxxSW_VERSIONxxx/bzImage-std
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=controller,worker instname=debian instbr=starlingx instsh=0 instab=0 ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=controller,worker instname=debian instbr=starlingx instsh=0 instab=0 inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
IPAPPEND 2

View File

@ -22,5 +22,5 @@ LABEL 1
MENU LABEL All-in-one (lowlatency)
MENU DEFAULT
KERNEL rel-xxxSW_VERSIONxxx/bzImage-rt
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=controller,worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=controller,worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
IPAPPEND 2

View File

@ -22,5 +22,5 @@ LABEL 1
MENU LABEL Storage
MENU DEFAULT
KERNEL rel-xxxSW_VERSIONxxx/bzImage-std
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=storage instname=debian instbr=starlingx instsh=0 instab=0 ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=storage instname=debian instbr=starlingx instsh=0 instab=0 inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
IPAPPEND 2

View File

@ -22,5 +22,5 @@ LABEL 1
MENU LABEL Worker
MENU DEFAULT
KERNEL rel-xxxSW_VERSIONxxx/bzImage-std
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=worker instname=debian instbr=starlingx instsh=0 instab=0 ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=worker instname=debian instbr=starlingx instsh=0 instab=0 inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
IPAPPEND 2

View File

@ -22,5 +22,5 @@ LABEL 1
MENU LABEL Worker (lowlatency)
MENU DEFAULT
KERNEL rel-xxxSW_VERSIONxxx/bzImage-rt
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
APPEND initrd=rel-xxxSW_VERSIONxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
IPAPPEND 2

View File

@ -4,6 +4,6 @@ GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
menuentry 'UEFI Standard Controller' {
linux rel-xxxSW_VERSIONxxx/bzImage-std defaultkernel=vmlinuz-*[!t]-amd64 rdinit=/install traits=controller instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
linux rel-xxxSW_VERSIONxxx/bzImage-std defaultkernel=vmlinuz-*[!t]-amd64 rdinit=/install traits=controller instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
initrd rel-xxxSW_VERSIONxxx/initrd
}

View File

@ -4,6 +4,6 @@ GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
menuentry 'UEFI All-in-one' {
linux rel-xxxSW_VERSIONxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=controller,worker instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
linux rel-xxxSW_VERSIONxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=controller,worker instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
initrd rel-xxxSW_VERSIONxxx/initrd
}

View File

@ -4,6 +4,6 @@ GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
menuentry 'UEFI All-in-one (lowlatency)' {
linux rel-xxxSW_VERSIONxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=controller,worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 efi=runtime xxxAPPEND_OPTIONSxxx
linux rel-xxxSW_VERSIONxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=controller,worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 efi=runtime xxxAPPEND_OPTIONSxxx
initrd rel-xxxSW_VERSIONxxx/initrd
}

View File

@ -4,6 +4,6 @@ GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
menuentry 'UEFI Storage' {
linux rel-xxxSW_VERSIONxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=storage instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
linux rel-xxxSW_VERSIONxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=storage instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
initrd rel-xxxSW_VERSIONxxx/initrd
}

View File

@ -4,6 +4,6 @@ GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
menuentry 'UEFI Worker' {
linux rel-xxxSW_VERSIONxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=worker instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
linux rel-xxxSW_VERSIONxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 traits=worker instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 xxxAPPEND_OPTIONSxxx
initrd rel-xxxSW_VERSIONxxx/initrd
}

View File

@ -4,6 +4,6 @@ GRUB_HIDDEN_TIMEOUT=0
GRUB_TIMEOUT_STYLE='countdown'
menuentry 'UEFI Worker (lowlatency)' {
linux rel-xxxSW_VERSIONxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 efi=runtime xxxAPPEND_OPTIONSxxx
linux rel-xxxSW_VERSIONxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 traits=worker,lowlatency instname=debian instbr=starlingx instsh=0 instab=0 BOOTIF=$net_default_mac inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/feed/rel-xxxSW_VERSIONxxx/ostree_repo console=ttyS0,115200 console=tty1 biosdevname=0 biosplusefi=1 efi=runtime xxxAPPEND_OPTIONSxxx
initrd rel-xxxSW_VERSIONxxx/initrd
}

View File

@ -21,33 +21,33 @@ menuentry 'UEFI Boot from hard drive' --id=disk {
submenu 'UEFI Debian Controller Install' --id=standard {
menuentry 'Serial Console' --id=serial {
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
initrdefi xxxPXEBOOTxxx/initrd
}
menuentry 'Graphical Console' --id=graphical {
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
initrdefi xxxPXEBOOTxxx/initrd
}
}
submenu 'UEFI Debian All-in-one Install' --id=aio {
menuentry 'Serial Console' --id=serial {
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
initrdefi xxxPXEBOOTxxx/initrd
}
menuentry 'Graphical Console' --id=graphical {
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
linuxefi xxxPXEBOOTxxx/bzImage-std rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
initrdefi xxxPXEBOOTxxx/initrd
}
}
submenu 'UEFI Debian All-in-one (lowlatency) Install' --id=aio-lowlat {
menuentry 'Serial Console' --id=serial {
linuxefi xxxPXEBOOTxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency efi=runtime BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
linuxefi xxxPXEBOOTxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency efi=runtime BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
initrdefi xxxPXEBOOTxxx/initrd
}
menuentry 'Graphical Console' --id=graphical {
linuxefi xxxPXEBOOTxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency efi=runtime BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
linuxefi xxxPXEBOOTxxx/bzImage-rt rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency efi=runtime BOOTIF=$net_default_mac instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
initrdefi xxxPXEBOOTxxx/initrd
}
}

View File

@ -39,86 +39,130 @@ if [ -e ${boot_env_path}/boot.env ]; then
save_env -f ${boot_env_path}/boot.env boot_tried_count
fi
search --no-floppy --label --set=avol ${boot_part}${boot_mode}
if [ -e ($avol)/1/kernel.env ] ; then
load_env -s -f ($avol)/1/kernel.env kernel
fi
if [ "$ab" = "1" ] ; then
search --no-floppy --label --set=bvol ${boot_part}${rollback_part}
set partition_based_root="0"
if [ "$partition_based_root" = "1" ] ; then
search --no-floppy --label --set=avol ${boot_part}${boot_mode}
if [ -e ($avol)/1/kernel.env ] ; then
load_env -s -f ($avol)/1/kernel.env kernel_rollback
load_env -s -f ($avol)/1/kernel.env kernel
fi
else
if [ -e ($avol)/2/kernel.env ] ; then
load_env -s -f ($avol)/2/kernel.env kernel_rollback
if [ "$ab" = "1" ] ; then
search --no-floppy --label --set=bvol ${boot_part}${rollback_part}
if [ -e ($avol)/1/kernel.env ] ; then
load_env -s -f ($avol)/1/kernel.env kernel_rollback
fi
else
if [ -e ($avol)/2/kernel.env ] ; then
load_env -s -f ($avol)/2/kernel.env kernel_rollback
fi
fi
fi
get_efivar -f uint8 -s secured SecureBoot
if [ "${secured}" = "1" ]; then
# Enable user authentication to make grub unlockable
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000.7C392DD2FFEA15F1E050CF88DB414F128724C55039614BFCF22D9F3AA775E534BEC0A0A2E6C49FE3CBBC7A1A9CE7546D11FD198197A375044EF96D189EC22141.712E252EC3009DD64C5157615DF84F46B3D4A7C6F40DF941CB62C8965B25AA3D62B0D2080545FCB7801A62A72244F87DC13FF26D740A32D96D5F85017BB4AB03
else
get_efivar -f uint8 -s unprovisioned SetupMode
if [ "${unprovisioned}" = "1" ]; then
set timeout=0
get_efivar -f uint8 -s secured SecureBoot
if [ "${secured}" = "1" ]; then
# Enable user authentication to make grub unlockable
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000.7C392DD2FFEA15F1E050CF88DB414F128724C55039614BFCF22D9F3AA775E534BEC0A0A2E6C49FE3CBBC7A1A9CE7546D11FD198197A375044EF96D189EC22141.712E252EC3009DD64C5157615DF84F46B3D4A7C6F40DF941CB62C8965B25AA3D62B0D2080545FCB7801A62A72244F87DC13FF26D740A32D96D5F85017BB4AB03
else
get_efivar -f uint8 -s unprovisioned SetupMode
if [ "${unprovisioned}" = "1" ]; then
set timeout=0
menuentry "Automatic Certificate Provision" --unrestricted {
chainloader ${prefix}/LockDown.efi
}
fi
fi
menuentry "Automatic Certificate Provision" --unrestricted {
chainloader ${prefix}/LockDown.efi
}
fi
fi
menuentry "StarlingX ostree${boot_mode} ${kernel}" --unrestricted {
set fallback=1
if [ "${legacy_bios}" != "1" ]; then
efi-watchdog enable 0 180
fi
search --no-floppy --label --set=root ${boot_part}${boot_mode}
if [ -e /1/kernel.env ] ; then
load_env -s -f /1/kernel.env kernel_params_ext
fi
linux /1/${kernel} rw rootwait ostree_boot=LABEL=${boot_part}${boot_mode} ostree_root=LABEL=${root_part}${boot_mode} flux=${flux_part} ostree=/ostree/1 $ostree_console $kernel_params $kernel_params_ext
initrd /1/initramfs
}
menuentry "StarlingX ostree${boot_mode} ${kernel}" --unrestricted {
set fallback=1
if [ "${legacy_bios}" != "1" ]; then
efi-watchdog enable 0 180
fi
search --no-floppy --label --set=root ${boot_part}${boot_mode}
if [ -e /1/kernel.env ] ; then
load_env -s -f /1/kernel.env kernel_params_ext
fi
linux /1/${kernel} rw rootwait ostree_boot=LABEL=${boot_part}${boot_mode} ostree_root=/dev/mapper/cgts--vg-root--lv rd.lvm.lv=cgts/root-lv flux=${flux_part} ostree=/ostree/1 $ostree_console $kernel_params $kernel_params_ext
initrd /1/initramfs
}
if [ "$ab" = "1" ] ; then
menuentry "StarlingX ostree ${kernel_rollback} rollback${rollback_part}" --unrestricted {
search --no-floppy --label --set=root ${boot_part}${rollback_part}
if [ -e /1/kernel.env ] ; then
load_env -s -f /1/kernel.env kernel_params_ext
fi
linux /1/${kernel_rollback} rw rootwait ostree_boot=LABEL=${boot_part}${rollback_part} ostree_root=LABEL=${root_part}${rollback_part} flux=${flux_part} ostree=/ostree/1 $ostree_console $kernel_params $kernel_params_ext
initrd /1/initramfs
}
else
menuentry "StarlingX ostree${boot_mode} ${kernel_rollback} rollback" --unrestricted {
set fallback=1
if [ "${legacy_bios}" != "1" ]; then
efi-watchdog enable 0 180
fi
search --no-floppy --label --set=root ${boot_part}${boot_mode}
if [ -e /2/kernel.env ] ; then
load_env -s -f /2/kernel.env kernel_params_ext
fi
linux /2/${kernel_rollback} rw rootwait ostree_boot=LABEL=${boot_part}${boot_mode} ostree_root=LABEL=${root_part}${boot_mode} flux=${flux_part} ostree=/ostree/2 $ostree_console $kernel_params $kernel_params_ext
initrd /2/initramfs
}
fi
if [ "$ab" = "1" ] ; then
menuentry "StarlingX ostree ${kernel_rollback} rollback${rollback_part}" --unrestricted {
search --no-floppy --label --set=root ${boot_part}${rollback_part}
if [ -e /1/kernel.env ] ; then
load_env -s -f /1/kernel.env kernel_params_ext
fi
linux /1/${kernel_rollback} rw rootwait ostree_boot=LABEL=${boot_part}${rollback_part} ostree_root=LABEL=${root_part}${rollback_part} flux=${flux_part} ostree=/ostree/1 $ostree_console $kernel_params $kernel_params_ext
initrd /1/initramfs
}
else
menuentry "StarlingX ostree${boot_mode} ${kernel_rollback} rollback" --unrestricted {
set fallback=1
if [ "${legacy_bios}" != "1" ]; then
efi-watchdog enable 0 180
fi
search --no-floppy --label --set=root ${boot_part}${boot_mode}
if [ -e /2/kernel.env ] ; then
load_env -s -f /2/kernel.env kernel_params_ext
fi
linux /2/${kernel_rollback} rw rootwait ostree_boot=LABEL=${boot_part}${boot_mode} ostree_root=/dev/mapper/cgts--vg-root--lv rd.lvm.lv=cgts/root-lv flux=${flux_part} ostree=/ostree/2 $ostree_console $kernel_params $kernel_params_ext
initrd /2/initramfs
}
fi
if [ -s ${prefix}/igrub.cfg ] ; then
source ${prefix}/igrub.cfg
search --no-floppy --label --set=avol ${boot_part}${boot_mode}
if [ "$ab" = "1" ] ; then
search --no-floppy --label --set=bvol ${boot_part}${rollback_part}
if [ ! -s ($avol)/1/${kernel} -a ! -s ($bvol)/1/${kernel_rollback} ] ; then
set default="2"
if [ -s ${prefix}/igrub.cfg ] ; then
source ${prefix}/igrub.cfg
search --no-floppy --label --set=avol ${boot_part}${boot_mode}
if [ "$ab" = "1" ] ; then
search --no-floppy --label --set=bvol ${boot_part}${rollback_part}
if [ ! -s ($avol)/1/${kernel} -a ! -s ($bvol)/1/${kernel_rollback} ] ; then
set default="2"
fi
else
if [ ! -s ($avol)/1/${kernel} -a ! -s ($avol)/2/${kernel_rollback} ] ; then
set default="2"
fi
fi
else
if [ ! -s ($avol)/1/${kernel} -a ! -s ($avol)/2/${kernel_rollback} ] ; then
set default="2"
fi
fi
fi
fi
else
set ostree_root_lv='/dev/mapper/cgts--vg-root--lv'
set ostree_var_lv='/dev/mapper/cgts--vg-var--lv'
set kernel_root_lv='cgts/root-lv'
search --no-floppy --label --set=avol ${boot_part}${boot_mode}
if [ -e ($avol)/1/kernel.env ] ; then
load_env -s -f ($avol)/1/kernel.env kernel
fi
get_efivar -f uint8 -s secured SecureBoot
if [ "${secured}" = "1" ]; then
# Enable user authentication to make grub unlockable
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000.7C392DD2FFEA15F1E050CF88DB414F128724C55039614BFCF22D9F3AA775E534BEC0A0A2E6C49FE3CBBC7A1A9CE7546D11FD198197A375044EF96D189EC22141.712E252EC3009DD64C5157615DF84F46B3D4A7C6F40DF941CB62C8965B25AA3D62B0D2080545FCB7801A62A72244F87DC13FF26D740A32D96D5F85017BB4AB03
else
get_efivar -f uint8 -s unprovisioned SetupMode
if [ "${unprovisioned}" = "1" ]; then
set timeout=0
menuentry "Automatic Certificate Provision" --unrestricted {
chainloader ${prefix}/LockDown.efi
}
fi
fi
menuentry "StarlingX ostree${boot_mode} ${kernel}" --unrestricted {
set fallback=1
if [ "${legacy_bios}" != "1" ]; then
efi-watchdog enable 0 180
fi
search --no-floppy --label --set=root ${boot_part}${boot_mode}
if [ -e /1/kernel.env ] ; then
load_env -s -f /1/kernel.env kernel_params_ext
fi
linux /1/${kernel} rw rootwait ostree_boot=LABEL=${boot_part}${boot_mode} ostree_root=${ostree_root_lv} rd.lvm.lv=${kernel_root_lv} ostree_var=${ostree_var_lv} ostree=/ostree/1 $ostree_console $kernel_params $kernel_params_ext
initrd /1/initramfs
}
fi

View File

@ -25,12 +25,12 @@ menu begin
label 1
menu label Serial Console
kernel xxxPXEBOOTxxx/bzImage-std
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
ipappend 2
label 2
menu label Graphical Console
kernel xxxPXEBOOTxxx/bzImage-std
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
ipappend 2
menu end
@ -39,12 +39,12 @@ menu begin
label 3
menu label Serial Console
kernel xxxPXEBOOTxxx/bzImage-std
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
ipappend 2
label 4
menu label Graphical Console
kernel xxxPXEBOOTxxx/bzImage-std
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*[!t]-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
ipappend 2
menu end
@ -53,11 +53,11 @@ menu begin
label 5
menu label Serial Console
kernel xxxPXEBOOTxxx/bzImage-rt
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=ttyS0,115200 biosdevname=0 biosplusefi=1
ipappend 2
label 6
menu label Graphical Console
kernel xxxPXEBOOTxxx/bzImage-rt
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency instdev=xxxINSTDEVxxx ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
append initrd=xxxPXEBOOTxxx/initrd rdinit=/install defaultkernel=vmlinuz-*-rt-amd64 instname=debian instbr=starlingx instab=0 traits=controller,worker,lowlatency instdev=xxxINSTDEVxxx inst_ostree_root=/dev/mapper/cgts--vg-root--lv inst_ostree_var=/dev/mapper/cgts--vg-var--lv ks=xxxBASE_URLxxx/xxxFEEDxxx/kickstart/kickstart.cfg insturl=xxxBASE_URLxxx/xxxFEEDxxx/ostree_repo console=tty1 biosdevname=0 biosplusefi=1
ipappend 2
menu end

View File

@ -49,20 +49,6 @@
# Post Nochroot - Set up filesystems access
# Post Nochroot - Set up package links per node type
#
############################################################################
#
# LAT disk install override debug tool interface.
#
# lat-disk --install-device=${INSTDEV} \
# --fat-size=${FSZ} \
# --boot-size=${BSZ} \
# --root-size=${RSZ} \
# --var-size=${VSZ} \
# --inst-flux=0
#
# Notes: exported environment variables changed in 'post' sections
# do not change the original value.
#
###########################################################################
#
# The first kickstart script creates '/tmp/lat/functions' common functions
@ -481,13 +467,15 @@ function get_aio_controller_provisioning_sizes()
gib=\$((1024*1024*1024))
# Partitions
export EFI_SIZE=300
export BOOT_SIZE=500
export ROOTFS_SIZE=20000
export PART_SZ_EFI=300
export PART_SZ_BOOT=2048
export PART_SZ_ROOT=0
# Logical volumes
LOG_VOL_SIZE=8000
SCRATCH_VOL_SIZE=16000
export LV_SZ_LOG=8000
export LV_SZ_ROOT=20480
export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480
##
## NOTE: updates to partition sizes need to be also reflected in
@ -514,8 +502,10 @@ function get_aio_controller_provisioning_sizes()
## BACKUP = DEFAULT_DATABASE_STOR_SIZE +
## DEFAULT_PLATFORM_STOR_SIZE +
## BACKUP_OVERHEAD = 25GiB
## LOG_VOL_SIZE = 8GiB
## SCRATCH_VOL_SIZE = 16GiB
## LV_SZ_LOG = 8GiB
## LV_SZ_ROOT = 20 GiB
## LV_SZ_SCRATCH = 16GiB
## LV_SZ_VAR = 20 GiB
## RABBIT_LV = 2GiB
## DEFAULT_EXTENSION_STOR_SIZE = 1GiB
## KUBERNETES_DOCKER_STOR_SIZE = 30GiB
@ -526,7 +516,7 @@ function get_aio_controller_provisioning_sizes()
## DC_VAULT_SIZE = 15GiB
## RESERVED_PE = 16MiB (based on pesize=32768)
##
## MINIMUM_PLATFORM_PV_SIZE = (10 + 2*10 + 25 + 8 + 16 + 2 + 1 + 30 + 16 + 5 + 20 + 10 + 15)GiB + 16MiB/1024 = 178.02GiB
## MINIMUM_PLATFORM_PV_SIZE = (10 + 2*10 + 25 + 8 + 20 + 16 + 20 + 2 + 1 + 30 + 16 + 5 + 20 + 10 + 15)GiB + 16MiB/1024 = 218.02GiB
##
##***********************************************************************
## Small disk install - (for disks below 240GB)
@ -536,8 +526,8 @@ function get_aio_controller_provisioning_sizes()
## DEFAULT_SMALL_DATABASE_STOR_SIZE = 5GiB
## DEFAULT_SMALL_BACKUP_STOR_SIZE = 20GiB
##
## LOG_VOL_SIZE = 8GiB
## SCRATCH_VOL_SIZE = 16GiB
## LV_SZ_LOG = 8GiB
## LV_SZ_SCRATCH = 16GiB
## RABBIT_LV = 2GiB
## DEFAULT_EXTENSION_STOR_SIZE = 1GiB
## KUBERNETES_DOCKER_STOR_SIZE = 30GiB
@ -559,8 +549,8 @@ function get_aio_controller_provisioning_sizes()
## DEFAULT_TINY_DATABASE_STOR_SIZE = 1GiB
## DEFAULT_TINY_BACKUP_STOR_SIZE = 1GiB
##
## LOG_VOL_SIZE = 3GiB
## SCRATCH_VOL_SIZE = 2GiB
## LV_SZ_LOG = 3GiB
## LV_SZ_SCRATCH = 2GiB
## RABBIT_LV = 2GiB
## DEFAULT_EXTENSION_STOR_SIZE = 1GiB
## TINY_KUBERNETES_DOCKER_STOR_SIZE = 20GiB
@ -570,7 +560,7 @@ function get_aio_controller_provisioning_sizes()
##
## MINIMUM_PLATFORM_PV_SIZE = (1 + 2*1 + 1 + 3 + 2 + 2 + 1 + 20 + 8 + 1 + 2)GiB = 43GiB
##
## MINIMUM_TINY_DISK_SIZE = MINIMUM_PLATFORM_PV_SIZE + ROOTFS_SIZE + EFI_SIZE + BOOT_SIZE + FLUXDATA + BACKUP_SIZE
## MINIMUM_TINY_DISK_SIZE = MINIMUM_PLATFORM_PV_SIZE + PART_SZ_ROOT + PART_SZ_EFI + PART_SZ_BOOT + FLUXDATA + BACKUP_SIZE
## = 43 + 20 + 0.03 + 0.5 + 20 + 1 = 85GiB
# TODO: create a log representing 'free space" on self expand partition.
@ -588,8 +578,8 @@ function get_aio_controller_provisioning_sizes()
# Round MINIMUM_PLATFORM_PV_SIZE to the closest upper value that can be divided by 1024.
if [ \${sz} -gt \$((\${default_small_disk_size}*\${gib})) ] ; then
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=179GiB*1024=183296 MiB"
export MINIMUM_PLATFORM_PV_SIZE=183296
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB"
export MINIMUM_PLATFORM_PV_SIZE=224256
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then
ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB"
@ -599,8 +589,8 @@ function get_aio_controller_provisioning_sizes()
ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB"
# Using a disk with a size under 85GiB will fail.
export MINIMUM_PLATFORM_PV_SIZE=44032
export LOG_VOL_SIZE=3000
export SCRATCH_VOL_SIZE=2000
export LV_SZ_LOG=3000
export LV_SZ_SCRATCH=2000
export BACKUP_DEFAULT_PERSISTENT_SIZE=1000
fi
}
@ -618,14 +608,16 @@ function get_std_controller_provisioning_sizes()
## _controller_filesystem_limits() in sysinv/api/controllers/v1/istorconfig.py
# Partitions
export EFI_SIZE=300
export BOOT_SIZE=500
export ROOTFS_SIZE=20000
export PART_SZ_EFI=300
export PART_SZ_BOOT=2048
export PART_SZ_ROOT=0
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
# Logical volumes
export LOG_VOL_SIZE=8000
export SCRATCH_VOL_SIZE=16000
export LV_SZ_LOG=8000
export LV_SZ_ROOT=20480
export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0 # Use all available space
@ -642,16 +634,19 @@ function get_worker_provisioning_sizes()
gib=\$((1024*1024*1024))
# Partitions
export EFI_SIZE=300
export BOOT_SIZE=500
export PART_SZ_EFI=300
export PART_SZ_BOOT=2048
export PART_SZ_ROOT=0
# Logical volumes
export LOG_VOL_SIZE=4000
export SCRATCH_VOL_SIZE=4000
export LV_SZ_LOG=4096
export LV_SZ_SCRATCH=4096
# Physical volumes
## LOG_VOL_SIZE = 4096
## SCRATCH_VOL_SIZE = 4096
## LV_SZ_LOG = 4096
## LV_SZ_SCRATCH = 4096
## LV_SZ_VAR=20480
##
## DOCKER = 30720
## CEPH_MON = 20480
## KUBELET_VOL_SIZE = 10240
@ -661,17 +656,18 @@ function get_worker_provisioning_sizes()
##
## Round CGTS_PV_SIZE to the closest upper value that can be divided by 1024.
## 69648/1024=68.01. CGTS_PV_SIZE=69*1024=70656.
export MINIMUM_PLATFORM_PV_SIZE=70656
MINIMUM_PLATFORM_PV_SIZE=70656
sz=\$(blockdev --getsize64 \${INSTDEV})
if [ \$sz -le \$((80*\$gib)) ] ; then
## Less than 80GB use a 10GB root partition
export ROOTFS_SIZE=10000
if [ \$sz -le \$((120*\$gib)) ] ; then
export LV_SZ_ROOT=10240
export LV_SZ_VAR=10240
else
## Use a 20GB root partition
export ROOTFS_SIZE=20000
export LV_SZ_ROOT=20480
export LV_SZ_VAR=20480
fi
export MINIMUM_PLATFORM_PV_SIZE=\$((\$MINIMUM_PLATFORM_PV_SIZE + \$LV_SZ_ROOT + \$LV_SZ_VAR))
ilog "Install disk \${INSTDEV} has size:\${sz}B, \$((\${sz}/\$gib))GiB"
}
@ -686,28 +682,25 @@ function get_storage_provisioning_sizes()
gib=\$((1024*1024*1024))
# Partitions
export EFI_SIZE=300
export BOOT_SIZE=500
export PART_SZ_EFI=300
export PART_SZ_BOOT=2048
export PART_SZ_ROOT=0
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0
# Logical volumes
sz=\$(blockdev --getsize64 \${INSTDEV})
if [ \$sz -le \$((90*\$gib)) ] ; then
# Partitions
export ROOTFS_SIZE=10000
# Logical volumes
export LOG_VOL_SIZE=4000
export SCRATCH_VOL_SIZE=4000
if [ \$sz -le \$((120*\$gib)) ] ; then
export LV_SZ_LOG=4000
export LV_SZ_ROOT=10240
export LV_SZ_SCRATCH=4000
export LV_SZ_VAR=10240
else
# Partitions
export ROOTFS_SIZE=20000
# Logical volumes
export LOG_VOL_SIZE=8000
export SCRATCH_VOL_SIZE=8000
export LV_SZ_LOG=8000
export LV_SZ_ROOT=20480
export LV_SZ_SCRATCH=8000
export LV_SZ_VAR=20480
fi
ilog "Install disk \${INSTDEV} has size:\${sz}B, \$((\${sz}/\$gib))GiB"
@ -902,8 +895,6 @@ if [ $? -eq 0 ]; then
debug=1
fi
ilog "LAT size parameters: FSZ=${FSZ} BSZ=${BSZ} RSZ=${RSZ} VSZ=${VSZ}"
# First, parse /proc/cmdline to find the boot args
set -- `cat /proc/cmdline`
ilog "/proc/cmdline:$*"
@ -1551,7 +1542,7 @@ true
###########################################################################
%part --interpreter=/bin/bash
HOOK_LABEL=" part"
HOOK_LABEL="part"
. /tmp/lat/ks_functions.sh
ilog "*****************************************"
ilog "*** Partition - Partition Disks ***"
@ -1580,17 +1571,6 @@ fi
MIB_BYTES=$((1024*1024))
# LAT variables: overridden and aligned to previous releases
# FSZ=# - MB size of fat partition
FSZ=300
# BSZ=# - MB size of boot partition
BSZ=500
# RSZ=# - MB size of root partition
# VSZ=# - MB size of var partition (0 for auto expand)
# Display partition sizes
BIOSSZ=1
ilog "LAT size parameters: BIOSSZ=${BIOSSZ} BLM=${BLM} FSZ=${FSZ} BSZ=${BSZ} RSZ=${RSZ} VSZ=${VSZ}"
# Start common partitioning regardless of personality
sgdisk_parts=""
@ -1613,6 +1593,7 @@ start_sec=$first
part_no=1
if [ "$USE_UEFI_PARTITIONS" = 0 -o "${controller}" = false ] ; then
# 1MB size for BIOS boot partition
BIOSSZ=1
end_sec=$(($start_sec+(${BIOSSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:bios -t $part_no:EF02"
check_partitioning_status
@ -1661,31 +1642,39 @@ elif [ "${storage}" = true ] ; then
get_storage_provisioning_sizes
fi
ilog "PART_SZ_EFI : ${PART_SZ_EFI}"
ilog "PART_SZ_BOOT : ${PART_SZ_BOOT}"
ilog "PART_SZ_ROOT : ${PART_SZ_ROOT}"
# 300 MiB size for EFI boot partition to align with previous releases
end_sec=$(($start_sec+(${FSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
end_sec=$(($start_sec+(${PART_SZ_EFI}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaefi -t $part_no:EF00"
check_partitioning_status
# Boot/Root OSTree Partition A (Note: OSTree Partition B not used)
end_sec=$(($start_sec+(${BSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaboot"
check_partitioning_status
if [ "$INSTAB" = 0 -a "${INSTFLUX}" = 0 ] ; then
if [ "$VSZ" = 0 ] ; then
report_failure_with_msg "Installation with VSZ=0 is not supported."
else
end_sec=$(($start_sec+(${RSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
fi
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
else
end_sec=$(($start_sec+(${RSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
if [ "${PART_SZ_BOOT}" != 0 ] ; then
end_sec=$(($start_sec+(${PART_SZ_BOOT}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaboot"
check_partitioning_status
fi
if [ "${PART_SZ_ROOT}" != 0 ] ; then
if [ "$INSTAB" = 0 -a "${INSTFLUX}" = 0 ] ; then
if [ "$VSZ" = 0 ] ; then
report_failure_with_msg "Installation with VSZ=0 is not supported."
else
end_sec=$(($start_sec+(${PART_SZ_ROOT}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
fi
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
else
end_sec=$(($start_sec+(${PART_SZ_ROOT}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
fi
check_partitioning_status
fi
check_partitioning_status
# Flux Partition
if [ "${INSTFLUX}" = 1 ] ; then
if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
if [ "$VSZ" = 0 ] ; then
report_failure_with_msg "Installation with VSZ=0 is not supported."
else
@ -1736,9 +1725,11 @@ lv="logical volume"
dev=$(get_disk "${INSTDEV}")
if [ "${controller}" = true ] ; then
get_std_controller_provisioning_sizes
elif [ "${aio}" = true ] ; then
get_aio_controller_provisioning_sizes
if [ "${aio}" = true ] ; then
get_aio_controller_provisioning_sizes
else
get_std_controller_provisioning_sizes
fi
elif [ "${worker}" = true ] ; then
get_worker_provisioning_sizes
elif [ "${storage}" = true ] ; then
@ -1787,16 +1778,20 @@ mkfs.vfat -n otaefi ${fs_dev}${part_no}
part_no=$((part_no+1))
# Boot/Root OSTree Partition A (Note: OSTree Partition B not used)
mkfs.ext4 -F -L otaboot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Boot filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
if [ "${PART_SZ_BOOT}" != 0 ] ; then
mkfs.ext4 -F -L otaboot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Boot filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
fi
mkfs.ext4 -F -L otaroot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Root filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
if [ "${PART_SZ_ROOT}" != 0 ] ; then
mkfs.ext4 -F -L otaroot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Root filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
fi
# Flux Partition
if [ "${INSTFLUX}" = 1 ] ; then
if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
mkfs.ext4 -F -L fluxdata ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Fluxdata (/var) filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
@ -1808,24 +1803,43 @@ log_lvm_conf "Installer Initial" /etc/lvm/lvm.conf
# Create Volume Group
pv_part=${fs_dev}${part_no}
ilog "MINIMUM_PLATFORM_PV_SIZE : ${MINIMUM_PLATFORM_PV_SIZE}"
ilog "SCRATCH_VOL_SIZE : ${SCRATCH_VOL_SIZE}"
ilog "ROOTFS_SIZE : ${ROOTFS_SIZE}"
ilog "LOG_VOL_SIZE : ${LOG_VOL_SIZE}"
ilog "cgts--vg-log--lv size: ${LOG_VOL_SIZE} MB"
ilog "cgts--vg-scratch--lv : ${SCRATCH_VOL_SIZE} MB"
ilog "Install disk: ${INSTDEV}"
ilog "Current disk: ${dev} ; current partition index:$part_no"
ilog "Physical Volume: ${pv_part}"
ilog "MINIMUM_PLATFORM_PV_SIZE (${pv_part}): ${MINIMUM_PLATFORM_PV_SIZE} MB (0 = all avail space)"
ilog "LV_SZ_LOG (cgts--vg-log--lv size): ${LV_SZ_LOG} MB"
ilog "LV_SZ_ROOT (cgts--vg-root--lv) : ${LV_SZ_ROOT} MB"
ilog "LV_SZ_SCRATCH (cgts--vg-scratch--lv) : ${LV_SZ_SCRATCH} MB"
ilog "LV_SZ_VAR (cgts--vg-var--lv) : ${LV_SZ_VAR} MB"
ilog "Create ${vg} 'cgts-vg' ${pv_part} ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "vgcreate -y --force cgts-vg ${pv_part} 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${vg} 'cgts-vg' ${pv_part}"
if [ "${LV_SZ_ROOT}" != 0 ] ; then
# Create and Init the '/' logical volume
ilog "Create ${lv} 'root-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n root-lv --size ${LV_SZ_ROOT}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'root-lv'"
ilog "InitFs ${lv} 'root-lv'"
mkfs.ext4 -F /dev/cgts-vg/root-lv
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to init ${lv} 'root-lv'"
fi
if [ "${LV_SZ_VAR}" != 0 ] ; then
# Create and Init the '/' logical volume
ilog "Create ${lv} 'var-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n var-lv --size ${LV_SZ_ROOT}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'root-lv'"
ilog "InitFs ${lv} 'var-lv'"
mkfs.ext4 -F /dev/cgts-vg/var-lv
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to init ${lv} 'root-lv'"
fi
# Create and Init the '/var/log' logical volume
ilog "Create ${lv} 'log-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n log-lv --size ${LOG_VOL_SIZE}MB cgts-vg 2>/dev/null" 5 0.5
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n log-lv --size ${LV_SZ_LOG}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'log-lv'"
ilog "InitFs ${lv} 'log-lv'"
@ -1834,7 +1848,7 @@ mkfs.ext4 -F /dev/cgts-vg/log-lv
# Create and init the '/scratch' logical volume
ilog "Create ${lv} 'scratch-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n scratch-lv --size ${SCRATCH_VOL_SIZE}MB cgts-vg 2>/dev/null" 5 0.5
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n scratch-lv --size ${LV_SZ_SCRATCH}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'scratch-lv'"
ilog "InitFs ${lv} 'scratch-lv'"
@ -1920,8 +1934,10 @@ else
#
##############################################################
ilog "OSTREE_ROOT_DEVICE: ${OSTREE_ROOT_DEVICE}"
ilog "OSTREE_VAR_DEVICE : ${OSTREE_VAR_DEVICE}"
PHYS_SYSROOT="/sysroot"
OSTREE_ROOT_DEVICE="LABEL=otaroot"
mkdir -p ${PHYS_SYSROOT}
mount -o rw,noatime "${OSTREE_ROOT_DEVICE}" "${PHYS_SYSROOT}" || elog "Error mounting ${OSTREE_ROOT_DEVICE}"
@ -1948,6 +1964,7 @@ else
if [ $rc -ne 0 ]; then
report_failure_with_msg "ostree pull failed, rc=$rc"
fi
umount ${PHYS_SYSROOT}
fi

View File

@ -54,20 +54,6 @@
# Post Nochroot - Set up filesystems access
# Post Nochroot - Set up package links per node type
#
############################################################################
#
# LAT disk install override debug tool interface.
#
# lat-disk --install-device=${INSTDEV} \
# --fat-size=${FSZ} \
# --boot-size=${BSZ} \
# --root-size=${RSZ} \
# --var-size=${VSZ} \
# --inst-flux=0
#
# Notes: exported environment variables changed in 'post' sections
# do not change the original value.
#
###########################################################################
#
# The first kickstart script creates '/tmp/lat/functions' common functions
@ -483,13 +469,15 @@ function get_aio_controller_provisioning_sizes()
gib=\$((1024*1024*1024))
# Partitions
export EFI_SIZE=300
export BOOT_SIZE=500
export ROOTFS_SIZE=20000
export PART_SZ_EFI=300
export PART_SZ_BOOT=2048
export PART_SZ_ROOT=0
# Logical volumes
LOG_VOL_SIZE=8000
SCRATCH_VOL_SIZE=16000
export LV_SZ_LOG=8000
export LV_SZ_ROOT=20480
export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480
##
## NOTE: updates to partition sizes need to be also reflected in
@ -516,8 +504,10 @@ function get_aio_controller_provisioning_sizes()
## BACKUP = DEFAULT_DATABASE_STOR_SIZE +
## DEFAULT_PLATFORM_STOR_SIZE +
## BACKUP_OVERHEAD = 25GiB
## LOG_VOL_SIZE = 8GiB
## SCRATCH_VOL_SIZE = 16GiB
## LV_SZ_LOG = 8GiB
## LV_SZ_ROOT = 20 GiB
## LV_SZ_SCRATCH = 16GiB
## LV_SZ_VAR = 20 GiB
## RABBIT_LV = 2GiB
## DEFAULT_EXTENSION_STOR_SIZE = 1GiB
## KUBERNETES_DOCKER_STOR_SIZE = 30GiB
@ -528,7 +518,7 @@ function get_aio_controller_provisioning_sizes()
## DC_VAULT_SIZE = 15GiB
## RESERVED_PE = 16MiB (based on pesize=32768)
##
## MINIMUM_PLATFORM_PV_SIZE = (10 + 2*10 + 25 + 8 + 16 + 2 + 1 + 30 + 16 + 5 + 20 + 10 + 15)GiB + 16MiB/1024 = 178.02GiB
## MINIMUM_PLATFORM_PV_SIZE = (10 + 2*10 + 25 + 8 + 20 + 16 + 20 + 2 + 1 + 30 + 16 + 5 + 20 + 10 + 15)GiB + 16MiB/1024 = 218.02GiB
##
##***********************************************************************
## Small disk install - (for disks below 240GB)
@ -538,8 +528,8 @@ function get_aio_controller_provisioning_sizes()
## DEFAULT_SMALL_DATABASE_STOR_SIZE = 5GiB
## DEFAULT_SMALL_BACKUP_STOR_SIZE = 20GiB
##
## LOG_VOL_SIZE = 8GiB
## SCRATCH_VOL_SIZE = 16GiB
## LV_SZ_LOG = 8GiB
## LV_SZ_SCRATCH = 16GiB
## RABBIT_LV = 2GiB
## DEFAULT_EXTENSION_STOR_SIZE = 1GiB
## KUBERNETES_DOCKER_STOR_SIZE = 30GiB
@ -561,8 +551,8 @@ function get_aio_controller_provisioning_sizes()
## DEFAULT_TINY_DATABASE_STOR_SIZE = 1GiB
## DEFAULT_TINY_BACKUP_STOR_SIZE = 1GiB
##
## LOG_VOL_SIZE = 3GiB
## SCRATCH_VOL_SIZE = 2GiB
## LV_SZ_LOG = 3GiB
## LV_SZ_SCRATCH = 2GiB
## RABBIT_LV = 2GiB
## DEFAULT_EXTENSION_STOR_SIZE = 1GiB
## TINY_KUBERNETES_DOCKER_STOR_SIZE = 20GiB
@ -572,7 +562,7 @@ function get_aio_controller_provisioning_sizes()
##
## MINIMUM_PLATFORM_PV_SIZE = (1 + 2*1 + 1 + 3 + 2 + 2 + 1 + 20 + 8 + 1 + 2)GiB = 43GiB
##
## MINIMUM_TINY_DISK_SIZE = MINIMUM_PLATFORM_PV_SIZE + ROOTFS_SIZE + EFI_SIZE + BOOT_SIZE + FLUXDATA + BACKUP_SIZE
## MINIMUM_TINY_DISK_SIZE = MINIMUM_PLATFORM_PV_SIZE + PART_SZ_ROOT + PART_SZ_EFI + PART_SZ_BOOT + FLUXDATA + BACKUP_SIZE
## = 43 + 20 + 0.03 + 0.5 + 20 + 1 = 85GiB
# TODO: create a log representing 'free space" on self expand partition.
@ -590,8 +580,8 @@ function get_aio_controller_provisioning_sizes()
# Round MINIMUM_PLATFORM_PV_SIZE to the closest upper value that can be divided by 1024.
if [ \${sz} -gt \$((\${default_small_disk_size}*\${gib})) ] ; then
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=179GiB*1024=183296 MiB"
export MINIMUM_PLATFORM_PV_SIZE=183296
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB"
export MINIMUM_PLATFORM_PV_SIZE=224256
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then
ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB"
@ -601,8 +591,8 @@ function get_aio_controller_provisioning_sizes()
ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB"
# Using a disk with a size under 85GiB will fail.
export MINIMUM_PLATFORM_PV_SIZE=44032
export LOG_VOL_SIZE=3000
export SCRATCH_VOL_SIZE=2000
export LV_SZ_LOG=3000
export LV_SZ_SCRATCH=2000
export BACKUP_DEFAULT_PERSISTENT_SIZE=1000
fi
}
@ -620,14 +610,16 @@ function get_std_controller_provisioning_sizes()
## _controller_filesystem_limits() in sysinv/api/controllers/v1/istorconfig.py
# Partitions
export EFI_SIZE=300
export BOOT_SIZE=500
export ROOTFS_SIZE=20000
export PART_SZ_EFI=300
export PART_SZ_BOOT=2048
export PART_SZ_ROOT=0
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
# Logical volumes
export LOG_VOL_SIZE=8000
export SCRATCH_VOL_SIZE=16000
export LV_SZ_LOG=8000
export LV_SZ_ROOT=20480
export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0 # Use all available space
@ -641,40 +633,8 @@ function get_std_controller_provisioning_sizes()
#########################################################################
function get_worker_provisioning_sizes()
{
gib=\$((1024*1024*1024))
# Partitions
export EFI_SIZE=300
export BOOT_SIZE=500
# Logical volumes
export LOG_VOL_SIZE=4000
export SCRATCH_VOL_SIZE=4000
# Physical volumes
## LOG_VOL_SIZE = 4096
## SCRATCH_VOL_SIZE = 4096
## DOCKER = 30720
## CEPH_MON = 20480
## KUBELET_VOL_SIZE = 10240
## RESERVED_PE = 16 (based on pesize=32768)
##
## CGTS_PV_SIZE = 4096 + 4096 + 30720 + 20480 + 10240 + 16 = 69648
##
## Round CGTS_PV_SIZE to the closest upper value that can be divided by 1024.
## 69648/1024=68.01. CGTS_PV_SIZE=69*1024=70656.
export MINIMUM_PLATFORM_PV_SIZE=70656
sz=\$(blockdev --getsize64 \${INSTDEV})
if [ \$sz -le \$((80*\$gib)) ] ; then
## Less than 80GB use a 10GB root partition
export ROOTFS_SIZE=10000
else
## Use a 20GB root partition
export ROOTFS_SIZE=20000
fi
ilog "Install disk \${INSTDEV} has size:\${sz}B, \$((\${sz}/\$gib))GiB"
# miniboot: unused
ilog get_worker_provisioning_sizes
}
#########################################################################
@ -1006,8 +966,6 @@ if [ $? -eq 0 ]; then
debug=1
fi
ilog "LAT size parameters: FSZ=${FSZ} BSZ=${BSZ} RSZ=${RSZ} VSZ=${VSZ}"
# First, parse /proc/cmdline to find the boot args
set -- `cat /proc/cmdline`
ilog "/proc/cmdline:$*"
@ -1669,17 +1627,6 @@ fi
MIB_BYTES=$((1024*1024))
# LAT variables: overridden and aligned to previous releases
# FSZ=# - MB size of fat partition
FSZ=300
# BSZ=# - MB size of boot partition
BSZ=500
# RSZ=# - MB size of root partition
# VSZ=# - MB size of var partition (0 for auto expand)
# Display partition sizes
BIOSSZ=1
ilog "LAT size parameters: BIOSSZ=${BIOSSZ} BLM=${BLM} FSZ=${FSZ} BSZ=${BSZ} RSZ=${RSZ} VSZ=${VSZ}"
# Start common partitioning regardless of personality
sgdisk_parts=""
@ -1702,6 +1649,7 @@ start_sec=$first
part_no=1
if [ "$USE_UEFI_PARTITIONS" = 0 -o "${controller}" = false ] ; then
# 1MB size for BIOS boot partition
BIOSSZ=1
end_sec=$(($start_sec+(${BIOSSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:bios -t $part_no:EF02"
check_partitioning_status
@ -1771,31 +1719,39 @@ elif [ "${storage}" = true ] ; then
get_storage_provisioning_sizes
fi
ilog "PART_SZ_EFI : ${PART_SZ_EFI}"
ilog "PART_SZ_BOOT : ${PART_SZ_BOOT}"
ilog "PART_SZ_ROOT : ${PART_SZ_ROOT}"
# 300 MiB size for EFI boot partition to align with previous releases
end_sec=$(($start_sec+(${FSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
end_sec=$(($start_sec+(${PART_SZ_EFI}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaefi -t $part_no:EF00"
check_partitioning_status
# Boot/Root OSTree Partition A (Note: OSTree Partition B not used)
end_sec=$(($start_sec+(${BSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaboot"
check_partitioning_status
if [ "$INSTAB" = 0 -a "${INSTFLUX}" = 0 ] ; then
if [ "$VSZ" = 0 ] ; then
report_failure_with_msg "Installation with VSZ=0 is not supported."
else
end_sec=$(($start_sec+(${RSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
fi
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
else
end_sec=$(($start_sec+(${RSZ}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
if [ "${PART_SZ_BOOT}" != 0 ] ; then
end_sec=$(($start_sec+(${PART_SZ_BOOT}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaboot"
check_partitioning_status
fi
if [ "${PART_SZ_ROOT}" != 0 ] ; then
if [ "$INSTAB" = 0 -a "${INSTFLUX}" = 0 ] ; then
if [ "$VSZ" = 0 ] ; then
report_failure_with_msg "Installation with VSZ=0 is not supported."
else
end_sec=$(($start_sec+(${PART_SZ_ROOT}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
fi
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
else
end_sec=$(($start_sec+(${PART_SZ_ROOT}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:otaroot"
fi
check_partitioning_status
fi
check_partitioning_status
# Flux Partition
if [ "${INSTFLUX}" = 1 ] ; then
if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
if [ "$VSZ" = 0 ] ; then
report_failure_with_msg "Installation with VSZ=0 is not supported."
else
@ -1860,9 +1816,11 @@ lv="logical volume"
dev=$(get_disk "${INSTDEV}")
if [ "${controller}" = true ] ; then
get_std_controller_provisioning_sizes
elif [ "${aio}" = true ] ; then
get_aio_controller_provisioning_sizes
if [ "${aio}" = true ] ; then
get_aio_controller_provisioning_sizes
else
get_std_controller_provisioning_sizes
fi
else
report_failure_with_msg "Unsupported install type: only Standard or All-in-one is supported"
fi
@ -1909,16 +1867,20 @@ mkfs.vfat -n otaefi ${fs_dev}${part_no}
part_no=$((part_no+1))
# Boot/Root OSTree Partition A (Note: OSTree Partition B not used)
mkfs.ext4 -F -L otaboot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Boot filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
if [ "${PART_SZ_BOOT}" != 0 ] ; then
mkfs.ext4 -F -L otaboot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Boot filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
fi
mkfs.ext4 -F -L otaroot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Root filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
if [ "${PART_SZ_ROOT}" != 0 ] ; then
mkfs.ext4 -F -L otaroot ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Root filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
fi
# Flux Partition
if [ "${INSTFLUX}" = 1 ] ; then
if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
mkfs.ext4 -F -L fluxdata ${fs_dev}${part_no}
[ ${?} -ne 0 ] && report_failure_with_msg "Failed Fluxdata (/var) filesystem init: ${fs_dev}${part_no}, rc=${?}"
part_no=$((part_no+1))
@ -1930,24 +1892,43 @@ log_lvm_conf "Installer Initial" /etc/lvm/lvm.conf
# Create Volume Group
pv_part=${fs_dev}${part_no}
ilog "MINIMUM_PLATFORM_PV_SIZE : ${MINIMUM_PLATFORM_PV_SIZE}"
ilog "SCRATCH_VOL_SIZE : ${SCRATCH_VOL_SIZE}"
ilog "ROOTFS_SIZE : ${ROOTFS_SIZE}"
ilog "LOG_VOL_SIZE : ${LOG_VOL_SIZE}"
ilog "cgts--vg-log--lv size: ${LOG_VOL_SIZE} MB"
ilog "cgts--vg-scratch--lv : ${SCRATCH_VOL_SIZE} MB"
ilog "Install disk: ${INSTDEV}"
ilog "Current disk: ${dev} ; current partition index:$part_no"
ilog "Physical Volume: ${pv_part}"
ilog "MINIMUM_PLATFORM_PV_SIZE (${pv_part}): ${MINIMUM_PLATFORM_PV_SIZE} MB (0 = all avail space)"
ilog "LV_SZ_LOG (cgts--vg-log--lv size): ${LV_SZ_LOG} MB"
ilog "LV_SZ_ROOT (cgts--vg-root--lv) : ${LV_SZ_ROOT} MB"
ilog "LV_SZ_SCRATCH (cgts--vg-scratch--lv) : ${LV_SZ_SCRATCH} MB"
ilog "LV_SZ_VAR (cgts--vg-var--lv) : ${LV_SZ_VAR} MB"
ilog "Create ${vg} 'cgts-vg' ${pv_part} ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "vgcreate -y --force cgts-vg ${pv_part} 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${vg} 'cgts-vg' ${pv_part}"
if [ "${LV_SZ_ROOT}" != 0 ] ; then
# Create and Init the '/' logical volume
ilog "Create ${lv} 'root-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n root-lv --size ${LV_SZ_ROOT}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'root-lv'"
ilog "InitFs ${lv} 'root-lv'"
mkfs.ext4 -F /dev/cgts-vg/root-lv
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to init ${lv} 'root-lv'"
fi
if [ "${LV_SZ_VAR}" != 0 ] ; then
# Create and Init the '/' logical volume
ilog "Create ${lv} 'var-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n var-lv --size ${LV_SZ_ROOT}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'root-lv'"
ilog "InitFs ${lv} 'var-lv'"
mkfs.ext4 -F /dev/cgts-vg/var-lv
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to init ${lv} 'root-lv'"
fi
# Create and Init the '/var/log' logical volume
ilog "Create ${lv} 'log-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n log-lv --size ${LOG_VOL_SIZE}MB cgts-vg 2>/dev/null" 5 0.5
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n log-lv --size ${LV_SZ_LOG}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'log-lv'"
ilog "InitFs ${lv} 'log-lv'"
@ -1956,7 +1937,7 @@ mkfs.ext4 -F /dev/cgts-vg/log-lv
# Create and init the '/scratch' logical volume
ilog "Create ${lv} 'scratch-lv' ; $STOR_DEV_FDS"
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n scratch-lv --size ${SCRATCH_VOL_SIZE}MB cgts-vg 2>/dev/null" 5 0.5
exec_no_fds "$STOR_DEV_FDS" "lvcreate -y -Wy -Zy -n scratch-lv --size ${LV_SZ_SCRATCH}MB cgts-vg 2>/dev/null" 5 0.5
[ ${?} -ne 0 ] && report_failure_with_msg "Failed to create ${lv} 'scratch-lv'"
ilog "InitFs ${lv} 'scratch-lv'"
@ -2042,8 +2023,10 @@ else
#
##############################################################
ilog "OSTREE_ROOT_DEVICE: ${OSTREE_ROOT_DEVICE}"
ilog "OSTREE_VAR_DEVICE : ${OSTREE_VAR_DEVICE}"
PHYS_SYSROOT="/sysroot"
OSTREE_ROOT_DEVICE="LABEL=otaroot"
mkdir -p ${PHYS_SYSROOT}
mount -o rw,noatime "${OSTREE_ROOT_DEVICE}" "${PHYS_SYSROOT}" || elog "Error mounting ${OSTREE_ROOT_DEVICE}"