linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: rules for EVMS volumes
Date: Mon, 01 May 2006 15:43:40 +0000	[thread overview]
Message-ID: <44562CAC.9070107@ums.usu.ru> (raw)
In-Reply-To: <cfb54190605010806t3e57ce31s312fa4af678041de@mail.gmail.com>

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

  reply	other threads:[~2006-05-01 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-01 15:06 rules for EVMS volumes Hai Zaar
2006-05-01 15:43 ` Alexander E. Patrakov [this message]
2006-05-01 15:45 ` Hai Zaar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44562CAC.9070107@ums.usu.ru \
    --to=patrakov@ums.usu.ru \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).