Skip to content

Commit

Permalink
Create symbolic links in /dev/disk/by-vdev for nvme disk devices
Browse files Browse the repository at this point in the history
The existing rules miss nvme disk devices because of the trailing
digits in the KERNEL device name, e.g. nvme0n1. Partitions of nvme
disk devices are already properly handled by the existing rule for
ENV{DEVTYPE}=="partition".

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Kjeld Schouten <[email protected]>
Signed-off-by: Thomas Geppert <[email protected]>
Closes openzfs#9730
  • Loading branch information
geppi authored and behlendorf committed Dec 18, 2019
1 parent 3035f14 commit fe56484
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions udev/rules.d/69-vdev.rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ENV{DEVTYPE}=="disk", IMPORT{program}="@udevdir@/vdev_id -d %k"
ENV{DEVTYPE}=="partition", IMPORT{program}="@udevdir@/vdev_id -d %k"

KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
KERNEL=="nvme*[0-9]n*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="disk", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}-part%n"
KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"

Expand Down

0 comments on commit fe56484

Please sign in to comment.