* rules for EVMS volumes
@ 2006-05-01 15:06 Hai Zaar
2006-05-01 15:43 ` Alexander E. Patrakov
2006-05-01 15:45 ` Hai Zaar
0 siblings, 2 replies; 3+ messages in thread
From: Hai Zaar @ 2006-05-01 15:06 UTC (permalink / raw)
To: linux-hotplug
Hi!
I've wanted EVMS volumes to show in /dev/disk. So I've created the
following rules and placed them in /etc/udev/rules.d/61-evms.rules
(right after persistent rules).
KERNEL="dm-[0-9]*", ACTION="add", IMPORT{program}="/bin/bash -c
'echo DMNAME=$$(/sbin/dmsetup info -c --noopencount --noheadings -o
name -j %M -m %m)'"
KERNEL="dm-[0-9]*", ACTION="add", IMPORT{program}="/sbin/vol_id
--export $tempnode"
KERNEL="dm-[0-9]*", ACTION="add",
ENV{ID_FS_UUID}="?*",PROGRAM="/bin/test -e /dev/evms/$env{DMNAME}",
SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
KERNEL="dm-[0-9]*", ACTION="add",
ENV{ID_FS_LABEL_SAFE}="?*",PROGRAM="/bin/test -e
/dev/evms/$env{DMNAME}",
SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
Although it seems to work, I'd like to hear your comments if you have any.
Also I've wrote a small article
http://zaar.blogspot.com/2006/05/fine-grained-evms-device-nodes.html
which explains why and how I've come to this.
---------------------------------------------------
System: LFS-based, kernel 2.6.15, udev-0.8.1
--
Zaar
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rules for EVMS volumes
2006-05-01 15:06 rules for EVMS volumes Hai Zaar
@ 2006-05-01 15:43 ` Alexander E. Patrakov
2006-05-01 15:45 ` Hai Zaar
1 sibling, 0 replies; 3+ messages in thread
From: Alexander E. Patrakov @ 2006-05-01 15:43 UTC (permalink / raw)
To: linux-hotplug
Hai Zaar wrote:
> Hi!
>
> I've wanted EVMS volumes to show in /dev/disk. So I've created the
> following rules and placed them in /etc/udev/rules.d/61-evms.rules
> (right after persistent rules).
>
> KERNEL="dm-[0-9]*", ACTION="add", IMPORT{program}="/bin/bash -c
> 'echo DMNAME=$$(/sbin/dmsetup info -c --noopencount --noheadings -o
> name -j %M -m %m)'"
> KERNEL="dm-[0-9]*", ACTION="add", IMPORT{program}="/sbin/vol_id
> --export $tempnode"
> KERNEL="dm-[0-9]*", ACTION="add",
> ENV{ID_FS_UUID}="?*",PROGRAM="/bin/test -e /dev/evms/$env{DMNAME}",
> SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
> KERNEL="dm-[0-9]*", ACTION="add",
> ENV{ID_FS_LABEL_SAFE}="?*",PROGRAM="/bin/test -e
> /dev/evms/$env{DMNAME}", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
>
> Although it seems to work, I'd like to hear your comments if you have any.
>
> Also I've wrote a small article
> http://zaar.blogspot.com/2006/05/fine-grained-evms-device-nodes.html
> which explains why and how I've come to this.
> ---------------------------------------------------
> System: LFS-based, kernel 2.6.15, udev-0.8.1
Why does one ever need persistent names for DM devices? The default names (with
LVM2, this is something like /dev/mainvg/root) created by userspace packages are
already persistent enough to survive the move from old IDE drivers (that treat
IDE disks as /dev/hdX) to libata (which treats the same drivers as /dev/sdX)
without a single change to any configuration file.
Moreover, it is Just Wrong (TM) to have /dev/dm-X device nodes, because:
1) As already explained, userspace (e.g., dmsetup, vgmknodes, evms_activate,
etc.) already creates the correct nodes in the /dev/mapper directory and
symlinks to such nodes
2) The mere existence of /dev/dm-* breaks LILO (nodes in /dev/mapper are OK).
So, the only correct solution in this situation is implemented by Debian:
1) Prevent udev from creating device-mapper nodes at all, because it is the task
for other packages:
KERNEL="dm-[0-9]*", NAME=""
KERNEL="device-mapper", NAME="mapper/control"
2) Don't create persistent symlinks for DM devices, i.e. drop the line with
dmsetup from 60-persistent.rules (BTW, it uses SYMLINK="...", not SYMLINK+="..."
and is thus wrong again since it kills all other symlinks).
Kay: please remove the dmsetup rule from 60-persistent.rules.
--
Alexander E. Patrakov
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rules for EVMS volumes
2006-05-01 15:06 rules for EVMS volumes Hai Zaar
2006-05-01 15:43 ` Alexander E. Patrakov
@ 2006-05-01 15:45 ` Hai Zaar
1 sibling, 0 replies; 3+ messages in thread
From: Hai Zaar @ 2006-05-01 15:45 UTC (permalink / raw)
To: linux-hotplug
On 5/1/06, Alexander E. Patrakov <patrakov@ums.usu.ru> wrote:
>
> Why does one ever need persistent names for DM devices? The default names (with
> LVM2, this is something like /dev/mainvg/root) created by userspace packages are
> already persistent enough to survive the move from old IDE drivers (that treat
> IDE disks as /dev/hdX) to libata (which treats the same drivers as /dev/sdX)
> without a single change to any configuration file.
Well, my intention is to see all of my attached hard disks under
/dev/disk/, particularly, under /dev/disk/by-uuid. So if today I use
EVMS, I'd like EVMS stuff to arrange appropriate links in /dev/disk.
If tomorrow I switch to LVM2, I'd like LVM2 to do the same.
>
> Moreover, it is Just Wrong (TM) to have /dev/dm-X device nodes, because:
>
> 1) As already explained, userspace (e.g., dmsetup, vgmknodes, evms_activate,
> etc.) already creates the correct nodes in the /dev/mapper directory and
> symlinks to such nodes
with EVMS its actually /dev/evms/...
>
> 2) The mere existence of /dev/dm-* breaks LILO (nodes in /dev/mapper are OK).
>
> So, the only correct solution in this situation is implemented by Debian:
>
> 1) Prevent udev from creating device-mapper nodes at all, because it is the task
> for other packages:
>
> KERNEL="dm-[0-9]*", NAME=""
> KERNEL="device-mapper", NAME="mapper/control"
Ok, if we drop /dev/dm-*, then probably /dev/disk/... links should
point directly to /dev/ems/...
--
Zaar
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-01 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-01 15:06 rules for EVMS volumes Hai Zaar
2006-05-01 15:43 ` Alexander E. Patrakov
2006-05-01 15:45 ` Hai Zaar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).