Re: Udev integration for device-mapper and its subsystems.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the feedback. Will this model be more acceptable then?

Peter


/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"

ENV{DM_NAME}=="?*", NAME="$kernel", SYMLINK+="mapper/$env{DM_NAME}"

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"
--
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

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux