On Wed, Apr 29, 2009 at 22:11, Peter Rajnoha <prajnoha@xxxxxxxxxx> wrote: > /lib/udev/rules.d > ================= > 10-dm.rules > ----------- > KERNEL=="device-mapper", NAME="mapper/control" > > SUBSYSTEM!="block", GOTO="dm_end" > KERNEL!="dm-[0-9]*", GOTO="dm_end" > > # We supress the creation of nodes on ADD events, they must be created on CHANGE events only! > ACTION=="add", NAME="" > ACTION!="change", GOTO="dm_end" > > TEST=="dm", ENV{DM_NAME}="$attr{dm/name}", ENV{DM_UUID}="$attr{dm/uuid}" > TEST!="dm", IMPORT{program}="/sbin/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o name,uuid" Wasn't there something that added the DM_* variables to the kernel directly? I remember seing something a while back. If that is still planned or possible, maybe you can just do thes both rules only if the values are not set? ENV{DM_NAME}="", ENV{DM_NAME}="$attr{dm/name}", ... ENV{DM_NAME}="", IMPORT{program}= ... > ENV{DM_NAME}=="?*", NAME="$kernel", SYMLINK+="mapper/$env{DM_NAME}" NAME="$kernel" is the default, it's not needed. > LABEL="dm_end" > > > 12-lvm.rules > ------------ > SUBSYSTEM!="block", GOTO="lvm_end" > KERNEL!="dm-[0-9]*", GOTO="lvm_end" > ACTION!="change", GOTO="lvm_end" > ENV{DM_UUID}!="LVM-?*", GOTO="lvm_end" > > IMPORT{program}="/sbin/dmsetup lvmsplit $env{DM_NAME} --nameprefixes --noheadings --rows" > > ENV{DM_LV_NAME}=="?*_mlog", GOTO="lvm_end" > ENV{DM_LV_NAME}=="?*_mimage_[0-9]*", GOTO="lvm_end" > > ENV{DM_VG_NAME}=="?*", ENV{DM_LV_NAME}=="?*", ENV{DM_LV_LAYER}!="?*", SYMLINK+="$env{DM_VG_NAME}/$env{DM_LV_NAME}" > > LABEL="lvm_end" > > > 95-dm-notify.rules > ------------------ > SUBSYSTEM!="block", GOTO="dm_end" > KERNEL!="dm-[0-9]*", GOTO="dm_end" > ACTION!="change|remove", GOTO="dm_end" > > ENV{DM_COOKIE}=="?*", RUN+="/sbin/dmsetup udevnotify $env{DM_COOKIE}" > > LABEL="dm_end" > > /etc/udev/rules.d > ================= > 11-dm-permissions.rules (I don't think this is a documentation or > a dead file, sorry :)) > ----------------------------------------------------------------- > SUBSYSTEM!="block", GOTO="dm_end" > KERNEL!="dm-[0-9]*", GOTO="dm_end" > ACTION!="change", GOTO="dm_end" > > #ENV{DM_NAME}=="my_device", OWNER:="peter", GROUP:="peter", MODE:="644" > > # Default permissions > KERNEL=="dm-[0-9]*", OWNER:="root", GROUP:="root", MODE:="600" > > LABEL="dm_end" Yeah, looks great. Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html