r737 - lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d

Bastian Blank waldi at alioth.debian.org
Wed Sep 30 03:19:43 UTC 2009


Author: waldi
Date: Wed Sep 30 03:19:42 2009
New Revision: 737

Log:
* debian/tree/lvm2/lib/udev/rules.d/56-lvm.rules: Hide all subvolumes.
* debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules: Cleanup.

Added:
   lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/56-lvm.rules
      - copied, changed from r723, lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules
Modified:
   lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules

Copied and modified: lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/56-lvm.rules (from r723, lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules)
==============================================================================
--- lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules	Sat Sep  5 21:53:41 2009	(r723, copy source)
+++ lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/56-lvm.rules	Wed Sep 30 03:19:42 2009	(r737)
@@ -1,32 +1,13 @@
 # Udev rules for LVM.
-#
-# These rules create symlinks for LVM logical volumes in
-# /dev/VG directory (VG is an actual VG name). Some udev
-# environment variables are set (they can be used in later
-# rules as well):
-#   DM_LV_NAME - logical volume name
-#   DM_VG_NAME - volume group name
-#   DM_LV_LAYER - logical volume layer (blank if not set)
 
-SUBSYSTEM!="block", GOTO="persistent_storage_lvm_end"
-KERNEL!="dm-[0-9]*", GOTO="persistent_storage_lvm_end"
-ACTION!="add|change", GOTO="persistent_storage_lvm_end"
-ENV{DM_UUID}!="LVM-?*", GOTO="persistent_storage_lvm_end"
-
-# Normally, we operate on "change" events only. But when
-# coldplugging, there's an "add" event present. We have
-# to recognize this and do our actions in this particular
-# situation, too.
-ACTION=="add", ENV{STARTUP}!="1", GOTO="persistent_storage_lvm_end"
+ENV{DM_UUID}!="LVM-?*", 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}"
 
 # Do not create symlinks for hidden subdevices.
-ENV{DM_LV_NAME}=="?*_mlog", GOTO="persistent_storage_lvm_end"
-ENV{DM_LV_NAME}=="?*_mimage_[0-9]*", GOTO="persistent_storage_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}"
+ENV{DM_LV_NAME}=="?*_mlog", DM_HIDE=1
+ENV{DM_LV_NAME}=="?*_mimage_[0-9]*", DM_HIDE=1
+ENV{DM_LV_LAYER}=="?*", DM_HIDE=1
 
-LABEL="persistent_storage_lvm_end"
+LABEL="lvm_end"

Modified: lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules
==============================================================================
--- lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules	Wed Sep 30 03:11:00 2009	(r736)
+++ lvm2/trunk/debian/tree/lvm2/lib/udev/rules.d/60-persistent-storage-lvm.rules	Wed Sep 30 03:19:42 2009	(r737)
@@ -8,25 +8,9 @@
 #   DM_VG_NAME - volume group name
 #   DM_LV_LAYER - logical volume layer (blank if not set)
 
-SUBSYSTEM!="block", GOTO="persistent_storage_lvm_end"
-KERNEL!="dm-[0-9]*", GOTO="persistent_storage_lvm_end"
-ACTION!="add|change", GOTO="persistent_storage_lvm_end"
 ENV{DM_UUID}!="LVM-?*", GOTO="persistent_storage_lvm_end"
+ENV{DM_HIDE}!="", GOTO="persistent_storage_lvm_end"
 
-# Normally, we operate on "change" events only. But when
-# coldplugging, there's an "add" event present. We have
-# to recognize this and do our actions in this particular
-# situation, too.
-ACTION=="add", ENV{STARTUP}!="1", GOTO="persistent_storage_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}"
-
-# Do not create symlinks for hidden subdevices.
-ENV{DM_LV_NAME}=="?*_mlog", GOTO="persistent_storage_lvm_end"
-ENV{DM_LV_NAME}=="?*_mimage_[0-9]*", GOTO="persistent_storage_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}"
+ENV{DM_VG_NAME}=="?*", ENV{DM_LV_NAME}=="?*", SYMLINK+="$env{DM_VG_NAME}/$env{DM_LV_NAME}"
 
 LABEL="persistent_storage_lvm_end"



More information about the pkg-lvm-commits mailing list