Skip to content

Commit

Permalink
Merge pull request #1509 from jlebon/pr/faq-naming
Browse files Browse the repository at this point in the history
NO-JIRA: faq: clean up dynamic secondary device example
  • Loading branch information
openshift-merge-bot[bot] committed May 21, 2024
2 parents 8e6ac83 + 1f86e83 commit 353d297
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ systemd:
DefaultDependencies=false
After=systemd-udev-settle.service
Before=local-fs-pre.target
ConditionPathExists=!/etc/secondary-dev.env
ConditionPathExists=!/etc/found-secondary-device
# break boot if we fail
OnFailure=emergency.target
Expand All @@ -360,8 +360,7 @@ systemd:
Before=local-fs.target
[Mount]
EnvironmentFile=/etc/secondary-dev.env
What=$VAR_LIB_FOOBAR_DEV
What=/dev/disk/by-label/foobar
Where=/var/lib/foobar
Type=xfs
Expand All @@ -381,9 +380,9 @@ storage:
for serial in foobar bazboo; do
blkdev=/dev/disk/by-id/virtio-$serial
if [ -b "$blkdev" ]; then
mkfs.xfs -f "$blkdev"
mkfs.xfs -f "$blkdev" -L foobar
echo "Found secondary block device $blkdev" >&2
echo "VAR_LIB_FOOBAR_DEV=$blkdev" > /etc/secondary-dev.env
touch /etc/found-secondary-device
exit
fi
done
Expand All @@ -394,6 +393,8 @@ storage:
Note this approach uses `After=systemd-udev-settle.service` which is not usually desirable as it may slow down boot. Another related approach is writing a udev rule to create a more stable symlink instead of this dynamic systemd service + script approach.

This script is also written in a way that also makes it compatible to be used day-2 via a MachineConfig.

The larger issue tracking machine-specific MachineConfigs is at https://github.com/openshift/machine-config-operator/issues/1720.

## Q: Does RHCOS support the use of `NetworkManager` keyfiles? Does RHCOS support the use of `ifcfg` files?
Expand Down

0 comments on commit 353d297

Please sign in to comment.