-
Notifications
You must be signed in to change notification settings - Fork 157
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to this area of the code, I've also removed the |
||
|
||
# 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}" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: this will incorrectly trigger on
rd.multipath=0
(see https://github.com/dracutdevs/dracut/blob/9355cb8ea5024533210067373657dc337d63ecb9/modules.d/90multipath/multipathd.service#L12). I mean, a user really shouldn't have to do that, though still would be good to be resilient here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in the real root; I'm uncertain about pulling in
dracut-lib.sh
into the real root. We could try to shiprdcore
in the real root too and move this there?Or I could special case
rd.multipath=default
for now...Or it looks like
coreos-liveiso-autologin-generator
hashave_karg
that we could try to factor out into a little shell library shared by our shell generators...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do this as is so I can cherry pick it, and figure out a cleaner karg handling later?