diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-20 19:26:42 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-23 03:21:46 +0200 |
commit | 67c3e1f63a5221b47a8fea85ae421671f29f3b7e (patch) | |
tree | 048dc12c3ede1f2b8917610d83bd327d84c3efd0 /rules.d | |
parent | Merge pull request #24790 from poettering/run-chdir (diff) | |
download | systemd-67c3e1f63a5221b47a8fea85ae421671f29f3b7e.tar.xz systemd-67c3e1f63a5221b47a8fea85ae421671f29f3b7e.zip |
udev: support by-path devlink for multipath nvme block devices
If multipath feature is enabled, nvme block devices may belong to the
"nvme-subsystem" subsystem, instead of "nvme" subsystem.
(What a confusing name...)
Then, the syspath is something like the following,
/sys/devices/virtual/nvme-subsystem/nvme-subsys0/nvme0n1
Hence, we need to find the 'real parent' device, such as
/sys/devices/pci0000:00/0000:00:1c.4/0000:3c:00.0/nvme/nvme0
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2031810.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2124964.
Replaces #24748.
Diffstat (limited to 'rules.d')
-rw-r--r-- | rules.d/60-persistent-storage.rules | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rules.d/60-persistent-storage.rules b/rules.d/60-persistent-storage.rules index 03f0a619dc..64a2409196 100644 --- a/rules.d/60-persistent-storage.rules +++ b/rules.d/60-persistent-storage.rules @@ -88,6 +88,7 @@ KERNEL=="msblk[0-9]p[0-9]|mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL} # by-path ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id" +ENV{DEVTYPE}=="disk", SUBSYSTEMS=="nvme-subsystem", IMPORT{builtin}="path_id" KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-boot%n" KERNEL!="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" |