Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ include::modules/installation-user-infra-machines-static-network.adoc[leveloffse

include::modules/rhcos-enabling-multipath.adoc[leveloffset=+2]

include::modules/rhcos-multipath-secondary-disk.adoc[leveloffset=+3]

include::modules/installation-installing-bare-metal.adoc[leveloffset=+1]

[role="_additional-resources"]
Expand Down
2 changes: 2 additions & 0 deletions installing/installing_bare_metal/installing-bare-metal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ include::modules/installation-user-infra-machines-static-network.adoc[leveloffse

include::modules/rhcos-enabling-multipath.adoc[leveloffset=+2]

include::modules/rhcos-multipath-secondary-disk.adoc[leveloffset=+3]

[role="_additional-resources"]
.Additional resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ include::modules/installation-user-infra-machines-static-network.adoc[leveloffse

include::modules/rhcos-enabling-multipath.adoc[leveloffset=+2]

include::modules/rhcos-multipath-secondary-disk.adoc[leveloffset=+3]

include::modules/installation-installing-bare-metal.adoc[leveloffset=+1]

[role="_additional-resources"]
Expand Down
14 changes: 12 additions & 2 deletions modules/rhcos-enabling-multipath.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ The following procedure enables multipath at installation time and appends kerne
{product-title} does not support enabling multipathing as a day-2 activity on nodes that have been upgraded from 4.6 or earlier.
====

.Prerequisites

* You have created the Ignition config files for your cluster.

* You have reviewed _Installing {op-system} and starting the {product-title} bootstrap process_.

.Procedure

. To enable multipath and start the `multipathd` daemon, run the following command on the installation host:
Expand All @@ -43,7 +49,8 @@ $ mpathconf --enable && systemctl start multipathd.service
+
[source,terminal]
----
$ coreos-installer install /dev/mapper/mpatha \ <1>
$ coreos-installer install /dev/mapper/mpatha \// <1>
--ignition-url=http://host/worker.ign \
--append-karg rd.multipath=default \
--append-karg root=/dev/disk/by-label/dm-mpath-root \
--append-karg rw
Expand All @@ -54,7 +61,8 @@ $ coreos-installer install /dev/mapper/mpatha \ <1>
+
[source,terminal]
----
$ coreos-installer install /dev/disk/by-id/wwn-<wwn_ID> \ <1>
$ coreos-installer install /dev/disk/by-id/wwn-<wwn_ID> \// <1>
--ignition-url=http://host/worker.ign \
--append-karg rd.multipath=default \
--append-karg root=/dev/disk/by-label/dm-mpath-root \
--append-karg rw
Expand All @@ -63,6 +71,8 @@ $ coreos-installer install /dev/disk/by-id/wwn-<wwn_ID> \ <1>
+
This symlink can also be used as the `coreos.inst.install_dev` kernel argument when using special `coreos.inst.*` arguments to direct the live installer. For more information, see "Installing {op-system} and starting the {product-title} bootstrap process".

. Reboot into the installed system.

. Check that the kernel arguments worked by going to one of the worker nodes and listing the kernel command line arguments (in `/proc/cmdline` on the host):
+
[source,terminal]
Expand Down
100 changes: 100 additions & 0 deletions modules/rhcos-multipath-secondary-disk.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Module included in the following assemblies:
//
// * installing/installing_bare_metal/upi/installing-bare-metal.adoc
// * installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc
// * installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc

:_mod-docs-content-type: PROCEDURE
[id="rhcos-multipath-secondary-disk_{context}"]
= Enabling multipathing on secondary disks

{op-system} also supports multipathing on a secondary disk. Instead of kernel arguments, you use Ignition to enable multipathing for the secondary disk at installation time.

.Prerequisites

* You have read the section _Disk partitioning_.
* You have read _Enabling multipathing with kernel arguments on {op-system}_.
* You have installed the Butane utility.

.Procedure

. Create a Butane config with information similar to the following:
+
.Example `multipath-config.bu`
[source,yaml]
----
variant: openshift
version: {product-version}.0
systemd:
units:
- name: mpath-configure.service
enabled: true
contents: |
[Unit]
Description=Configure Multipath on Secondary Disk
ConditionFirstBoot=true
ConditionPathExists=!/etc/multipath.conf
Before=multipathd.service <1>
DefaultDependencies=no

[Service]
Type=oneshot
ExecStart=/usr/sbin/mpathconf --enable <2>

[Install]
WantedBy=multi-user.target
- name: mpath-var-lib-container.service
enabled: true
contents: |
[Unit]
Description=Set Up Multipath On /var/lib/containers
ConditionFirstBoot=true <3>
Requires=dev-mapper-mpatha.device
After=dev-mapper-mpatha.device
After=ostree-remount.service
Before=kubelet.service
DefaultDependencies=no

[Service] <4>
Type=oneshot
ExecStart=/usr/sbin/mkfs.xfs -L containers -m reflink=1 /dev/mapper/mpatha
ExecStart=/usr/bin/mkdir -p /var/lib/containers

[Install]
WantedBy=multi-user.target
- name: var-lib-containers.mount
enabled: true
contents: |
[Unit]
Description=Mount /var/lib/containers
After=mpath-var-lib-containers.service
Before=kubelet.service <5>

[Mount] <6>
What=/dev/disk/by-label/dm-mpath-containers
Where=/var/lib/containers
Type=xfs

[Install]
WantedBy=multi-user.target
----
<1> The configuration must be set before launching the multipath daemon.
<2> Starts the `mpathconf` utility.
<3> This field must be set to the value `true`.
<4> Creates the filesystem and directory `/var/lib/containers`.
<5> The device must be mounted before starting any nodes.
<6> Mounts the device to the `/var/lib/containers` mount point. This location cannot be a symlink.

. Create the Ignition configuration by running the following command:
+
[source,terminal]
----
$ butane --pretty --strict multipath-config.bu > multipath-config.ign
----

. Continue with the rest of the first boot {op-system} installation process.
+
[IMPORTANT]
====
Do not add the `rd.multipath` or `root` kernel arguments on the command-line during installation unless the primary disk is also multipathed.
====