From f6aae7153d0487e2e5ba80dbee75bf938cf73271 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 30 Sep 2025 10:02:38 -0400 Subject: [PATCH] Use /dev/disk/by-id/coreos-boot-disk when creating /var partition This has been supported for a while and simplifies things because then your Ignition config is no longer specific to a device name. --- ...ation-disk-partitioning-upi-templates.adoc | 21 +++++++++++-------- modules/installation-disk-partitioning.adoc | 21 +++++++++++-------- ...ion-user-infra-machines-advanced-disk.adoc | 5 ++--- ...allation-user-infra-machines-advanced.adoc | 2 +- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/modules/installation-disk-partitioning-upi-templates.adoc b/modules/installation-disk-partitioning-upi-templates.adoc index 1639dfe46f3d..36bace54991f 100644 --- a/modules/installation-disk-partitioning-upi-templates.adoc +++ b/modules/installation-disk-partitioning-upi-templates.adoc @@ -83,7 +83,7 @@ $ ls $HOME/clusterconfig/openshift/ ... ---- -. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This example places the `/var` directory on a separate partition: +. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, and set the storage size as appropriate. This example places the `/var` directory on a separate partition on the boot disk: + [source,yaml,subs="attributes+"] ---- @@ -95,24 +95,27 @@ metadata: name: 98-var-partition storage: disks: - - device: /dev/disk/by-id/ <1> + - device: /dev/disk/by-id/coreos-boot-disk partitions: - label: var - start_mib: <2> - size_mib: <3> + start_mib: + size_mib: number: 5 filesystems: - device: /dev/disk/by-partlabel/var path: /var format: xfs - mount_options: [defaults, prjquota] <4> + mount_options: [defaults, prjquota] with_mount_unit: true ---- + -<1> The storage device name of the disk that you want to partition. -<2> When adding a data partition to the boot disk, a minimum value of 25000 MiB (Mebibytes) is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition. -<3> The size of the data partition in mebibytes. -<4> The `prjquota` mount option must be enabled for filesystems used for container storage. +where: ++ +-- +`start_mib`:: Specifies the starting offset of a disk partition in mebibytes (MiB). When adding a data partition to the boot disk, a minimum value of 25000 MiB is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition. +`size_mib`:: Specifies the size of the data partition in mebibytes (MiB). +`mount_options`:: Specifies the configurable mount options available. The `prjquota` mount option must be enabled for filesystems used for container storage. +-- + [NOTE] ==== diff --git a/modules/installation-disk-partitioning.adoc b/modules/installation-disk-partitioning.adoc index 7ad5f73ed4e0..acf66abfc7a4 100644 --- a/modules/installation-disk-partitioning.adoc +++ b/modules/installation-disk-partitioning.adoc @@ -81,7 +81,7 @@ $ ls $HOME/clusterconfig/openshift/ ... ---- -. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, change the disk device name to the name of the storage device on the `worker` systems, and set the storage size as appropriate. This example places the `/var` directory on a separate partition: +. Create a Butane config that configures the additional partition. For example, name the file `$HOME/clusterconfig/98-var-partition.bu`, and set the storage size as appropriate. This example places the `/var` directory on a separate partition on the boot disk: + [source,yaml,subs="attributes+"] ---- @@ -93,24 +93,27 @@ metadata: name: 98-var-partition storage: disks: - - device: /dev/disk/by-id/ <1> + - device: /dev/disk/by-id/coreos-boot-disk partitions: - label: var - start_mib: <2> - size_mib: <3> + start_mib: + size_mib: number: 5 filesystems: - device: /dev/disk/by-partlabel/var path: /var format: xfs - mount_options: [defaults, prjquota] <4> + mount_options: [defaults, prjquota] with_mount_unit: true ---- + -<1> The storage device name of the disk that you want to partition. -<2> When adding a data partition to the boot disk, a minimum value of 25000 mebibytes is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition. -<3> The size of the data partition in mebibytes. -<4> The `prjquota` mount option must be enabled for filesystems used for container storage. +where: ++ +-- +`start_mib`:: Specifies the starting offset of a disk partition in mebibytes (MiB). When adding a data partition to the boot disk, a minimum value of 25000 MiB is recommended. The root file system is automatically resized to fill all available space up to the specified offset. If no value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition. +`size_mib`:: Specifies the size of the data partition in mebibytes (MiB). +`mount_options`:: Specifies the configurable mount options available. The `prjquota` mount option must be enabled for filesystems used for container storage. +-- + [NOTE] ==== diff --git a/modules/installation-user-infra-machines-advanced-disk.adoc b/modules/installation-user-infra-machines-advanced-disk.adoc index d87182b68498..38e62bcefec7 100644 --- a/modules/installation-user-infra-machines-advanced-disk.adoc +++ b/modules/installation-user-infra-machines-advanced-disk.adoc @@ -92,7 +92,7 @@ metadata: name: 98-var-partition storage: disks: - - device: /dev/disk/by-id/ + - device: /dev/disk/by-id/coreos-boot-disk partitions: - label: var start_mib: @@ -108,7 +108,6 @@ storage: + where: + -``:: Specifies the storage device name of the disk that you want to partition. ``:: Specifies the minimum offset value for the boot disk. For best performance, specify a minimum offset value of 25000 mebibytes. The root file system is automatically resized to fill all available space up to the specified offset. If no offset value is specified, or if the specified value is smaller than the recommended minimum, the resulting root file system will be too small, and future reinstalls of {op-system} might overwrite the beginning of the data partition. ``:: Specifies the size of the data partition in mebibytes. `mount_options`:: The `prjquota` mount option must be enabled for filesystems used for container storage. @@ -160,4 +159,4 @@ ifeval::["{context}" == "installing-with-agent-based-installer"] endif::[] ifeval::["{context}" == "installing-restricted-networks-bare-metal"] :!restricted: -endif::[] \ No newline at end of file +endif::[] diff --git a/modules/installation-user-infra-machines-advanced.adoc b/modules/installation-user-infra-machines-advanced.adoc index fd1c576df3a9..5b5bef6ecddd 100644 --- a/modules/installation-user-infra-machines-advanced.adoc +++ b/modules/installation-user-infra-machines-advanced.adoc @@ -24,4 +24,4 @@ The advanced configuration topics for manual {op-system-first} installations det ifeval::["{context}" == "installing-restricted-networks-bare-metal"] :!restricted: -endif::[] \ No newline at end of file +endif::[]