summaryrefslogtreecommitdiffstats
path: root/udev/13-dm-disk.rules
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2009-10-26 14:04:31 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2009-10-26 14:04:31 +0000
commit5a3bd513803db04c70a14a1d4d9085b437ecdd4b (patch)
treefbbb2efa2f6167e9e665fafd2bd7814e9ca6922f /udev/13-dm-disk.rules
parent23087fc917179320b75e2aeca45ed7d55197f73f (diff)
downloadlvm2-5a3bd513803db04c70a14a1d4d9085b437ecdd4b.tar.gz
lvm2-5a3bd513803db04c70a14a1d4d9085b437ecdd4b.tar.xz
lvm2-5a3bd513803db04c70a14a1d4d9085b437ecdd4b.zip
Rename 11-lvm.rules to 11-dm-lvm.rules and 12-dm-disk.rules to 13-dm-disk.rules.
Diffstat (limited to 'udev/13-dm-disk.rules')
-rw-r--r--udev/13-dm-disk.rules23
1 files changed, 23 insertions, 0 deletions
diff --git a/udev/13-dm-disk.rules b/udev/13-dm-disk.rules
new file mode 100644
index 00000000..16a6edd2
--- /dev/null
+++ b/udev/13-dm-disk.rules
@@ -0,0 +1,23 @@
+# Udev rules for device-mapper devices.
+#
+# These rules create symlinks in /dev/disk directory.
+# Symlinks that depend on probing filesystem type,
+# label and uuid are created only if the device is not
+# suspended.
+
+# "add" event is processed on coldplug only!
+ACTION!="add|change", GOTO="dm_end"
+ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end"
+ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end"
+
+SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
+ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
+
+ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
+
+IMPORT{program}="$env{DM_SBIN_PATH}/blkid -o udev -p $tempnode"
+ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+
+LABEL="dm_end"