summaryrefslogtreecommitdiffstats
path: root/udev/rules.d/60-zpool.rules.in
diff options
context:
space:
mode:
Diffstat (limited to 'udev/rules.d/60-zpool.rules.in')
-rw-r--r--udev/rules.d/60-zpool.rules.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/udev/rules.d/60-zpool.rules.in b/udev/rules.d/60-zpool.rules.in
new file mode 100644
index 000000000..32fceed11
--- /dev/null
+++ b/udev/rules.d/60-zpool.rules.in
@@ -0,0 +1,9 @@
+#
+# /lib/udev/rules.d/60-zpool.rules
+#
+
+ENV{DEVTYPE}=="disk", IMPORT{program}="@udevdir@/zpool_id -d %p"
+
+KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}"
+KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}-part%n"
+KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}"