Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions modules/cnf-image-based-upgrade-shared-container-partition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ endif::[]
= Configuring a shared container partition between ostree stateroots

ifdef::ibu[]
[role="_abstract"]
Apply a `MachineConfig` to both the seed and the target clusters during installation time to create a separate partition and share the `/var/lib/containers` partition between the two `ostree` stateroots that will be used during the upgrade process.
endif::[]

Expand All @@ -23,6 +24,7 @@ You must complete this procedure at installation time.
====

ifdef::ibi[]
[role="_abstract"]
Apply a `MachineConfig` to the seed cluster to create a separate partition and share the `/var/lib/containers` partition between the two `ostree` stateroots that will be used during the preinstall process.
endif::[]

Expand Down Expand Up @@ -77,9 +79,12 @@ spec:
enabled: true
name: var-lib-containers.mount
----
<1> Specify the root disk.
<2> Specify the start of the partition in MiB. If the value is too small, the installation will fail.
<3> Specify a minimum size for the partition of 500 GB to ensure adequate disk space for precached images. If the value is too small, the deployments after installation will fail.
+
Where:
+
* `<root_disk>`: Specify the root disk.
* `<start_of_partition>`: Specify the start of the partition in MiB. If the value is too small, the installation will fail.
* `<partition_size>`: Specify a minimum size for the partition of 500 GB to ensure adequate disk space for precached images. If the value is too small, the deployments after installation will fail.

ifeval::["{context}" == "ibi-preparing-image-based-install"]
:!ibi:
Expand Down
14 changes: 7 additions & 7 deletions modules/ztp-image-based-upgrade-shared-container-partition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[id="ztp-image-based-upgrade-shared-container-partition_{context}"]
= Configuring a shared container directory between ostree stateroots when using {ztp}

[role="_abstract"]
When you are using the {ztp-first} workflow, you do the following procedure to create a separate disk partition on both the seed and target cluster and to share the `/var/lib/containers` partition.

[IMPORTANT]
Expand Down Expand Up @@ -42,9 +43,12 @@ storage:
- defaults
- prjquota
----
<1> Specify the root disk.
<2> Specify the start of the partition in MiB. If the value is too small, the installation will fail.
<3> Specify a minimum size for the partition of 500 GB to ensure adequate disk space for precached images. If the value is too small, the deployments after installation will fail.
+
Where:
+
* `<root_disk>`: Specify the root disk.
* `<start_of_partition>`: Specify the start of the partition in MiB. If the value is too small, the installation will fail.
* `<partition_size>`: Specify a minimum size for the partition of 500 GB to ensure adequate disk space for precached images. If the value is too small, the deployments after installation will fail.

. Convert the `storage.bu` to an Ignition file by running the following command:
+
Expand All @@ -54,7 +58,6 @@ storage:
$ butane storage.bu
----

.Example output
[source,terminal]
----
{"ignition":{"version":"3.2.0"},"storage":{"disks":[{"device":"/dev/disk/by-path/pci-0000:00:17.0-ata-1.0","partitions":[{"label":"var-lib-containers","sizeMiB":0,"startMiB":250000}],"wipeTable":false}],"filesystems":[{"device":"/dev/disk/by-partlabel/var-lib-containers","format":"xfs","mountOptions":["defaults","prjquota"],"path":"/var/lib/containers","wipeFilesystem":true}]},"systemd":{"units":[{"contents":"# Generated by Butane\n[Unit]\nRequires=systemd-fsck@dev-disk-by\\x2dpartlabel-var\\x2dlib\\x2dcontainers.service\nAfter=systemd-fsck@dev-disk-by\\x2dpartlabel-var\\x2dlib\\x2dcontainers.service\n\n[Mount]\nWhere=/var/lib/containers\nWhat=/dev/disk/by-partlabel/var-lib-containers\nType=xfs\nOptions=defaults,prjquota\n\n[Install]\nRequiredBy=local-fs.target","enabled":true,"name":"var-lib-containers.mount"}]}}
Expand Down Expand Up @@ -88,7 +91,6 @@ spec:
$ oc get bmh -n my-sno-ns my-sno -ojson | jq '.metadata.annotations["bmac.agent-install.openshift.io/ignition-config-overrides"]'
----

.Example output
[source,terminal]
----
"{\"ignition\":{\"version\":\"3.2.0\"},\"storage\":{\"disks\":[{\"device\":\"/dev/disk/by-path/pci-0000:00:17.0-ata-1.0\",\"partitions\":[{\"label\":\"var-lib-containers\",\"sizeMiB\":0,\"startMiB\":250000}],\"wipeTable\":false}],\"filesystems\":[{\"device\":\"/dev/disk/by-partlabel/var-lib-containers\",\"format\":\"xfs\",\"mountOptions\":[\"defaults\",\"prjquota\"],\"path\":\"/var/lib/containers\",\"wipeFilesystem\":true}]},\"systemd\":{\"units\":[{\"contents\":\"# Generated by Butane\\n[Unit]\\nRequires=systemd-fsck@dev-disk-by\\\\x2dpartlabel-var\\\\x2dlib\\\\x2dcontainers.service\\nAfter=systemd-fsck@dev-disk-by\\\\x2dpartlabel-var\\\\x2dlib\\\\x2dcontainers.service\\n\\n[Mount]\\nWhere=/var/lib/containers\\nWhat=/dev/disk/by-partlabel/var-lib-containers\\nType=xfs\\nOptions=defaults,prjquota\\n\\n[Install]\\nRequiredBy=local-fs.target\",\"enabled\":true,\"name\":\"var-lib-containers.mount\"}]}}"
Expand All @@ -103,7 +105,6 @@ $ oc get bmh -n my-sno-ns my-sno -ojson | jq '.metadata.annotations["bmac.agent-
# lsblk
----

.Example output
[source,terminal]
----
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
Expand All @@ -126,7 +127,6 @@ sda 8:0 0 446.6G 0 disk
# df -h
----

.Example output
[source,terminal]
----
Filesystem Size Used Avail Use% Mounted on
Expand Down