[DRBD-user] DRBD 8.3.1 on Lenny - udev rule failes

Lars Ellenberg lars.ellenberg at linbit.com
Wed May 27 12:57:08 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 Wed, May 27, 2009 at 11:03:01AM +0200, Robert wrote:
> Hello,
> 
> just tried to run DRBD 8.3.1 on Lenny. There seems to be a problem with 
> udev. Udevtrigger does not create the required devices..
> ----
> HOST:~# cat /proc/drbd
> version: 8.3.1 (api:88/proto:86-89)
> GIT-hash: fd40f4a8f9104941537d1afc8521e584a6d3003c build by root at HOST, 
> 2009-05-18 10:32:09
>  0: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown C r---
>     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:41943040
>  1: cs:WFConnection ro:Secondary/Unknown ds:Diskless/DUnknown C r---
>     ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
> 
> HOST:~# cat /etc/udev/rules.d/65-drbd.rules
> # This file contains the rules to create named DRBD devices.
> 
> KERNEL=="drbd*", \
>         IMPORT{program}="/sbin/drbdadm sh-udev minor-%m", \
>         NAME="$env{DEVICE}", \
>         SYMLINK="drbd/by-res/$env{RESOURCE} drbd/by-disk/$env{DISK}"
> 
> HOST:~# udevadm test /block/drbd0
> This program is for debugging only, it does not run any program,
> specified by a RUN key. It may show incorrect results, because
> some values may be different, or not available at a simulation run.
> 
> add_matching_files: unable to open '/lib/udev/rules.d': No such file or 
> directory
> parse_file: reading '/etc/udev/rules.d/50-udev.rules' as rules file
> parse_file: reading '/etc/udev/rules.d/60-persistent-input.rules' as 
> rules file
> parse_file: reading '/etc/udev/rules.d/60-persistent-storage-tape.rules' 
> as rules file
> parse_file: reading '/etc/udev/rules.d/60-persistent-storage.rules' as 
> rules file
> parse_file: reading '/etc/udev/rules.d/60-persistent-v4l.rules' as rules 
> file
> parse_file: reading '/etc/udev/rules.d/60-vzctl.rules' as rules file
> parse_file: reading '/dev/.udev/rules.d/61-dev-root-link.rules' as rules 
> file
> parse_file: reading '/etc/udev/rules.d/65-drbd.rules' as rules file
> parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file
> parse_file: reading '/etc/udev/rules.d/75-cd-aliases-generator.rules' as 
> rules file
> parse_file: reading 
> '/etc/udev/rules.d/75-persistent-net-generator.rules' as rules file
> parse_file: reading '/etc/udev/rules.d/80-drivers.rules' as rules file
> parse_file: reading '/etc/udev/rules.d/91-permissions.rules' as rules file
> parse_file: reading '/etc/udev/rules.d/95-late.rules' as rules file
> import_uevent_var: import into environment: 'MAJOR=147'
> import_uevent_var: import into environment: 'MINOR=0'
> import_uevent_var: import into environment: 'DEVTYPE=disk'
> udevtest: looking at device '/block/drbd0' from subsystem 'block'
> match_rule: '/sys/block/drbd0/whole_disk' does not exist
> run_program: 'path_id /block/drbd0'
> run_program: '/lib/udev/path_id' returned with status 1
> udev_node_mknod: mknod(/dev/.tmp-147-0, 060600, (147,0))
> udev_node_mknod: chmod(/dev/.tmp-147-0, 060600)
> udev_node_mknod: chown(/dev/.tmp-147-0, 0, 0)
> run_program: 'vol_id --export /dev/.tmp-147-0'
> run_program: '/lib/udev/vol_id' (stderr) '/dev/.tmp-147-0: error opening 
> volume'
> run_program: '/lib/udev/vol_id' returned with status 2
> run_program: '/sbin/drbdadm sh-udev minor-0'
> run_program: '/sbin/drbdadm' (stdout) 'RESOURCE=ovz123666'
> run_program: '/sbin/drbdadm' (stdout) 'DISK=vg00/ovz123666'

there.
drbdadm sh-udev is supposed to also export DEVICE=.

> run_program: '/sbin/drbdadm' returned with status 0
> udev_rules_get_name: reset symlink list
> udev_rules_get_name: add symlink 'drbd/by-res/ovz123666'
> udev_rules_get_name: add symlink 'drbd/by-disk/vg00/ovz123666'
> udev_rules_get_name: rule applied, 'drbd0' becomes ''

yours did not, so drbd0 (kernel supplied) becomes '' (no DEVICE in
environment).

> udev_device_event: device node creation supressed

and is suppressed.

> Is this a bug ?

maybe.

what does your drbd.conf look like?

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