From 2927515f7e0fccba4a15529fcfe338d645d7ccad Mon Sep 17 00:00:00 2001 From: Ronan Hennessy Date: Tue, 19 Nov 2024 16:22:37 +0000 Subject: [PATCH] MGMT-19226: Addition specs and procedure for creating additional partitions --- .../ibi-factory-image-based-install.adoc | 9 +- .../ibi-extra-partition-ibi-install-iso.adoc | 89 +++++++++++++++++++ .../ibi-installer-installation-config.adoc | 2 + 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 modules/ibi-extra-partition-ibi-install-iso.adoc diff --git a/edge_computing/image_base_install/ibi-factory-image-based-install.adoc b/edge_computing/image_base_install/ibi-factory-image-based-install.adoc index 9062cfc750..9cc2d1012c 100644 --- a/edge_computing/image_base_install/ibi-factory-image-based-install.adoc +++ b/edge_computing/image_base_install/ibi-factory-image-based-install.adoc @@ -1,6 +1,6 @@ :_mod-docs-content-type: ASSEMBLY [id="ibi-factory-image-based-install"] -= About image-based installation for {sno} += Preinstalling {sno} using an image-based installation include::_attributes/common-attributes.adoc[] :context: ibi-factory-image-based-install @@ -23,6 +23,13 @@ The following are the high-level steps to preinstall a {sno} cluster using an im include::modules/ibi-create-iso-for-bmh.adoc[leveloffset=+1] +[role="_additional-resources"] +.Additional resources + +* xref:../../edge_computing/image_base_install/ibi_deploying_sno_clusters/ibi-edge-image-based-install-standalone.adoc#ibi-installer-configuration-config_ibi-edge-image-based-install[Reference specifications for the `image-based-installation-config.yaml` manifest] + +include::modules/ibi-extra-partition-ibi-install-iso.adoc[leveloffset=+2] + include::modules/ibi-provision-install-iso-to-bmh.adoc[leveloffset=+1] include::modules/ibi-installer-installation-config.adoc[leveloffset=+1] diff --git a/modules/ibi-extra-partition-ibi-install-iso.adoc b/modules/ibi-extra-partition-ibi-install-iso.adoc new file mode 100644 index 0000000000..a11ab8496c --- /dev/null +++ b/modules/ibi-extra-partition-ibi-install-iso.adoc @@ -0,0 +1,89 @@ +// Module included in the following assemblies: +// +// * edge_computing/image_base_install/ibi-factory-image-based-install.adoc + +:_mod-docs-content-type: PROCEDURE +[id="ibi-extra-partition-ibi-install-iso_{context}"] += Configuring additional partitions on the target host + +The installation ISO creates a partition for the `/var/lib/containers` directory as part of the image-based installation process. + +You can create additional partitions by using the `coreosInstallerArgs` specification. For example, in hard disks with adequate storage, you might need an additional partition for storage options, such as {lvms-first}. + +[NOTE] +==== +The `/var/lib/containers` partition requires at least 500 GB to ensure adequate disk space for precached images. You must create additional partitions with a starting position larger than the partition for `/var/lib/containers`. +==== + +.Procedure + +. Edit the `image-based-installation-config.yaml` file to configure additional partitions: ++ +.Example `image-based-installation-config.yaml` file +[source,yaml] +---- +apiVersion: v1beta1 +kind: ImageBasedInstallationConfig +metadata: + name: example-extra-partition +seedImage: quay.io/repo-id/seed:latest +seedVersion: "4.17.0" +installationDisk: /dev/sda +pullSecret: '{"auths": ...}' +# ... +skipDiskCleanup: true <1> +coreosInstallerArgs: + - "--save-partindex" <2> + - "6" <3> +ignitionConfigOverride: | + { + "ignition": { + "version": "3.2.0" + }, + "storage": { + "disks": [ + { + "device": "/dev/sda", <4> + "partitions": [ + { + "label": "storage", <5> + "number": 6, <6> + "sizeMiB": 380000, <7> + "startMiB": 500000 <8> + } + ] + } + ] + } + } + +---- +<1> Specify `true` to skip disk formatting during the installation process. +<2> Specify this argument to preserve a partition. +<3> The live installation ISO requires five partitions. Specify a number greater than five to identify the additional partition to preserve. +<4> Specify the installation disk on the target host. +<5> Specify the label for the partition. +<6> Specify the number for the partition. +<7> Specify the size of parition in MiB. +<8> Specify the starting position on the disk in MiB for the additional partition. You must specify a starting point larger that the partition for `var/lib/containers`. + +.Verification + +* When you complete the preinstallation of the host with the live installation ISO, login to the target host and run the following command to view the partitions: ++ +[source,terminal] +---- +$ lsblk +---- ++ +.Example output +[source,terminal] +---- +sda 8:0 0 140G 0 disk +├─sda1 8:1 0 1M 0 part +├─sda2 8:2 0 127M 0 part +├─sda3 8:3 0 384M 0 part /var/mnt/boot +├─sda4 8:4 0 120G 0 part /var/mnt +├─sda5 8:5 0 500G 0 part /var/lib/containers +└─sda6 8:6 0 380G 0 part +---- diff --git a/modules/ibi-installer-installation-config.adoc b/modules/ibi-installer-installation-config.adoc index b7c1448e0b..0acf6cd6cb 100644 --- a/modules/ibi-installer-installation-config.adoc +++ b/modules/ibi-installer-installation-config.adoc @@ -87,4 +87,6 @@ additionalTrustBundle: \| |`sshKey`|`string`|Specifies the SSH key to authenticate access to the host. |`ignitionConfigOverride`|`string`|Specifies a JSON string containing the user overrides for the Ignition config. The configuration merges with the Ignition config file generated by the installation program. This feature requires Ignition version is 3.2 or later. +|`coreosInstallerArgs`|`string`|Specifies custom arguments for the `coreos-install` command that you can use to configure kernel arguments and disk partitioning options. + |====