summaryrefslogtreecommitdiff
path: root/udev/11-lvm.rules
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2009-09-11 16:05:20 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2009-09-11 16:05:20 +0000
commit4515bcf289302e7cab79ac0487e078480cc4b9c7 (patch)
tree70855ab430e6debab144ad40cd8e40647b632557 /udev/11-lvm.rules
parentaa8728a2ab5c9c0ca58a3d3e300af95329a3863e (diff)
downloadlvm2-4515bcf289302e7cab79ac0487e078480cc4b9c7.tar.gz
Several changes in udev rules:
- add DM_UDEV_RULES_VSN to provide a variable to be checked for in the other rules (e.g. to check that DM rules are actually installed, we can alternate functionality in the other rules based on this information, also we have versioning support for the rules) - set proper sbin path for dmsetup and blkid, /sbin first, then /usr/sbin. This is necessary for anaconda to work properly. - add 'last_rule' for cryptsetup's temporary devices (symlinks in /dev/mapper only)
Diffstat (limited to 'udev/11-lvm.rules')
-rw-r--r--udev/11-lvm.rules6
1 files changed, 3 insertions, 3 deletions
diff --git a/udev/11-lvm.rules b/udev/11-lvm.rules
index 9b6ff667e..8ac6525c3 100644
--- a/udev/11-lvm.rules
+++ b/udev/11-lvm.rules
@@ -11,6 +11,7 @@
SUBSYSTEM!="block", GOTO="lvm_end"
KERNEL!="dm-[0-9]*", GOTO="lvm_end"
ACTION!="add|change", GOTO="lvm_end"
+ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
ENV{DM_UUID}!="LVM-?*", GOTO="lvm_end"
# Normally, we operate on "change" events only. But when
@@ -20,11 +21,10 @@ ENV{DM_UUID}!="LVM-?*", GOTO="lvm_end"
ACTION=="add", ENV{STARTUP}!="1", GOTO="lvm_end"
# Use DM name and split it up into its VG/LV/layer constituents.
-IMPORT{program}="/sbin/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"
+IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"
# Do not create symlinks for hidden subdevices.
-ENV{DM_LV_NAME}=="?*_mlog", GOTO="lvm_end"
-ENV{DM_LV_NAME}=="?*_mimage_[0-9]*", GOTO="lvm_end"
+ENV{DM_LV_NAME}=="?*_mimage_[0-9]*|pvmove?*|?*_vorigin", GOTO="lvm_end"
# Create symlinks for top-level devices only.
ENV{DM_VG_NAME}=="?*", ENV{DM_LV_NAME}=="?*", ENV{DM_LV_LAYER}!="?*", SYMLINK+="$env{DM_VG_NAME}/$env{DM_LV_NAME}"