Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coreos-boot-mount-generator: Always use mpath for /boot if for root #1022

Merged
merged 2 commits into from
May 19, 2021
Merged
Changes from 1 commit
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
@@ -1,24 +1,27 @@
# CoreOS-specific symlinks for dm-multipath filesystem labels,
# used for `label=boot` and `label=root`.

ACTION=="remove", GOTO="dm_label_end"
SUBSYSTEM!="block", GOTO="dm_label_end"
KERNEL!="dm-*", GOTO="dm_label_end"

# Ensure that the device mapper target is active
# And the required attributes exist.
ENV{DM_ACTIVATION}!="1", GOTO="dm_label_end"
ENV{ID_FS_LABEL_ENC}!="?*", GOTO="dm_label_end"
ENV{ID_FS_UUID_ENC}!="?*", GOTO="dm_label_end"
ENV{DM_SUSPENDED}=="1", GOTO="dm_label_end"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think this will help with some of the udev issues I'm working around in #1011.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to this area of the code, I've also removed the DM_ACTIVATION line in #1011, which makes the symlinks even more solid!


# Only act on filesystems. This should prevent layered devices
# such as Raid on Multipath devices from appearing.
ENV{ID_FS_USAGE}!="filesystem", GOTO="dm_label_end"

# And if the filesystem doesn't have a label+uuid, we're done.
ENV{ID_FS_LABEL_ENC}!="?*", GOTO="dm_label_end"
ENV{ID_FS_UUID_ENC}!="?*", GOTO="dm_label_end"

# Setup up Multipath labels and UUID's. Match on DM_UUID which
# is stable regardless of whether friendly names are used or not.
# 66-kpartx.rules use DM_UUID to match for linear mappings on multipath
# targets.
ENV{DM_UUID}=="*mpath*" \
, ENV{DM_SUSPENDED}=="Active" \
, ENV{DM_TABLES_LOADED}=="Live" \
, SYMLINK+="disk/by-label/dm-mpath-$env{ID_FS_LABEL_ENC}" \
, SYMLINK+="disk/by-uuid/dm-mpath-$env{ID_FS_UUID_ENC}"

Expand Down