[DRBD-user] CentOS 4.6 udev problem with DRBD

Lars Ellenberg lars.ellenberg at linbit.com
Tue May 19 11:00:21 CEST 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Mon, May 18, 2009 at 05:02:16PM -0400, Ken Dechick wrote:
> Hello all,
> 
> I am new to DRBD, and have so far found it very easy to use. I am having an issue however with udev. Running CentOS 4.6 on 2.6.9-67.0.22 kernel - my /dev/drbd0 device is not being created. Everything else seems to be working correctly. Running DRBD 8.3.1 built from source. In looking at my /dev directory there are odd entires:
> 
> lrwxrwxrwx  1 root root       17 May 19 01:50 cd0 -> /dev/$env{DEVICE}
> lrwxrwxrwx  1 root root       12 May 18 21:50 cdrom -> $env{DEVICE}
> lrwxrwxrwx  1 root root       12 May 18 21:50 dvd -> $env{DEVICE}
> brw-------  1 root root 147,   0 May 19 02:05 $env{DEVICE}
> lrwxrwxrwx  1 root root       12 May 19 01:50 par0 -> $env{DEVICE}
> lrwxrwxrwx  1 root root       12 May 18 21:50 ram -> $env{DEVICE}
> 
> I have configured hundreds of servers with CentOS 4.4-4.5 and never seen entries like this before.  I was sure the $ was not a valid character to use in a device (or file) name. After some looking I found a co-incidence: this same odd-ball string exists in the udev script for drbd:
> 
> KERNEL=="drbd*", \
>         IMPORT{program}="/sbin/drbdadm sh-udev minor-%m", \
>         NAME="$env{DEVICE}", \
>         SYMLINK="drbd/by-res/$env{RESOURCE} drbd/by-disk/$env{DISK}"
> 
> I appears to me that this udev script (came from the 8.3.1 source
> code) does not work properly with my distribution/kernel. Can anyone
> help me out here? I can of course create the /dev/drbd0 manually
> (mknod -m 0660 /dev/drbd0 b 147 0) but I would like to get to the
> bottom of what the problem is here. I am far from a udev expert never
> having had an issue with it in the past. Is this a udev rule issue or
> is my udev version simply too old?  I am running udev: 039-10.19.el4.
> 

if it was only DRBD, I'd say sorry and promise to not do it again.
but apparently none of your udev rules work,
your complete udev setup seems to be broken.
I mean, even par0, ram, cdrom and so on are affected by this
"non-expanding" of udev environment variables.


of coure, you can just remove the udev rules file,
and "all should be as before".  if udev does not find a rule, it
"defaults" to generate what the kernel asked for.

but you should really look into why your udev stuff breaks in this
"interessting" way.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list