From 1814a8e73006c1b42d291e8a9433d63b02cf1aa3 Mon Sep 17 00:00:00 2001 From: Thomas Geppert Date: Mon, 16 Dec 2019 18:31:05 +0100 Subject: [PATCH] Create symbolic links in /dev/disk/by-vdev for nvme disk devices. 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". --- udev/rules.d/69-vdev.rules.in | 1 + 1 file changed, 1 insertion(+) diff --git a/udev/rules.d/69-vdev.rules.in b/udev/rules.d/69-vdev.rules.in index 36a1a8ed5451..e0f23efc7283 100644 --- a/udev/rules.d/69-vdev.rules.in +++ b/udev/rules.d/69-vdev.rules.in @@ -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}"