From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Rajnoha Date: Wed, 29 Apr 2009 20:11:58 +0000 Subject: Re: Udev integration for device-mapper and its subsystems. Message-Id: <49F8B48E.2080208@redhat.com> List-Id: References: <49F5DC36.9080309@redhat.com> In-Reply-To: <49F5DC36.9080309@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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"