linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* not dynamically creating disk  device nodes
@ 2007-04-09 21:54 Leisner, Martin
  0 siblings, 0 replies; 4+ messages in thread
From: Leisner, Martin @ 2007-04-09 21:54 UTC (permalink / raw)
  To: linux-hotplug

I'm trying to use udev-092 on linux-2.6.10.

Most things work.

udevstart works fine.

But when I start playing around with fdisk, the device nodes aren't
getting erased/created
for the hard drive (udevstart had no problem figuring this out)..

udevd says:


udevd[1163]: udev_event_run: seq 707 forked, pid [1168], 'add' 'block',
0 seconds old
udevd-event[1168]: udev_db_get_device: no db file to read
/dev/.udev/db/block@sda: No such file or directory
udevd-event[1168]: udev_db_get_device: no db file to read
/dev/.udev/db/block@sda: No such file or directory
udevd-event[1168]: run_program: '/lib/udev/vol_id --export
/dev/.tmp-0-0'
udevd-event[1168]: run_program: '/lib/udev/vol_id' (stderr)
'/dev/.tmp-0-0: error open volume'
udevd-event[1168]: run_program: '/lib/udev/vol_id' returned with status
2
udevd-event[1168]: pass_env_to_socket: passed 211 bytes to socket
'/org/kernel/udev/monitor',
udevd-event[1168]: udev_event_run: seq 707 finished
udevd[1163]: udev_done: seq 707, pid [1168] exit with 0, 0 seconds old
udevd[1163]: udev_evSCSI device sda: 156301489 512-byte hdwr sectors
(80026 MB)
ent_run: seq 708SCSI device sda: drive cache: write back
 forked, pid [11 sda:71], 'remove' 'block', 0 seconds sda1 old
udevd-eve
nt[1171]: pass_env_to_socket: passed 217 bytes to socket
'/org/kernel/udev/monitor',
udevd-event[1171]: udev_event_run: seq 708 finished
udevd[1163]: udev_done: seq 708, pid [1171] exit with 0, 0 seconds old
udevd[1163]: udev_event_run: seq 709 forked, pid [1173], 'add' 'block',
0 seconds old
udevd-event[1173]: udev_db_get_device: no db file to read
/dev/.udev/db/block@sda: No such file or directory
udevd-event[1173]: udev_db_get_device: no db file to read
/dev/.udev/db/block@sda: No such file or directory
udevd-event[1173]: udev_node_mknod: preserve file '/dev/.tmp-0-0',
because it has correct dev_t
udevd-event[1173]: run_program: '/lib/udev/vol_id --export
/dev/.tmp-0-0'
udevd-event[1173]: run_program: '/lib/udev/vol_id' (stderr)
'/dev/.tmp-0-0: error open volume'
udevd-event[1173]: run_program: '/lib/udev/vol_id' returned with status
2
udevd-event[1173]: pass_env_to_socket: passed 211 bytes to socket
'/org/kernel/udev/monitor',
udevd-event[1173]: udev_event_run: seq 709 finished
udevd[1163]: udev_done: seq 709, pid [1173] exit with 0, 0 seconds old

There's a file call /dev/.udev/db/block@sda@sda1, which doesn't get
changed when I create/erase the partition in fdisk...


The create/delete cycles look reasonable in udevmonitor:
UDEV  [1176155427.317983] remove@/block/sda/sda1
UEVENT[1176155476.074846] add@/block/sda/sda1
UDEV  [1176155476.078997] add@/block/sda/sda1
UEVENT[1176155478.078643] remove@/block/sda/sda1
UDEV  [1176155478.079180] remove@/block/sda/sda1
UEVENT[1176155478.101634] add@/block/sda/sda1
UDEV  [1176155478.105939] add@/block/sda/sda1


FYI, I'm running the stock redhat rules...put udevsend in /sbin and
wrote /sbin/udevsend to /proc/sys/kernel/hotplug.

marty

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 4+ messages in thread

* Re: not dynamically creating disk device nodes
@ 2007-04-11  9:17 Kay Sievers
  2007-04-12 21:57 ` Leisner, Martin
  2007-04-12 22:15 ` Kay Sievers
  0 siblings, 2 replies; 4+ messages in thread
From: Kay Sievers @ 2007-04-11  9:17 UTC (permalink / raw)
  To: linux-hotplug

On 4/9/07, Leisner, Martin <Martin.Leisner@xerox.com> wrote:
> I'm trying to use udev-092 on linux-2.6.10.
>
> Most things work.
>
> udevstart works fine.
>
> But when I start playing around with fdisk, the device nodes aren't
> getting erased/created
> for the hard drive (udevstart had no problem figuring this out)..
>
> udevd says:
>
> udevd[1163]: udev_event_run: seq 707 forked, pid [1168], 'add' 'block',
> 0 seconds old
> udevd-event[1168]: udev_db_get_device: no db file to read
> /dev/.udev/db/block@sda: No such file or directory
> udevd-event[1168]: udev_db_get_device: no db file to read
> /dev/.udev/db/block@sda: No such file or directory
> udevd-event[1168]: run_program: '/lib/udev/vol_id --export
> /dev/.tmp-0-0'

Udev does not seem to get the correct major/minor number for the
device, "0-0" looks wrong.

It is likely, that the udev daemon (10 months old) expects
MAJOR/MINOR-values in the event environment, but that kernel (2.5
years old) doesn't export it.

Udevstart reads that information from the "dev" file in sysfs, that's
why it may work just fine.

Kay

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 4+ messages in thread

* RE: not dynamically creating disk device nodes
  2007-04-11  9:17 not dynamically creating disk device nodes Kay Sievers
@ 2007-04-12 21:57 ` Leisner, Martin
  2007-04-12 22:15 ` Kay Sievers
  1 sibling, 0 replies; 4+ messages in thread
From: Leisner, Martin @ 2007-04-12 21:57 UTC (permalink / raw)
  To: linux-hotplug

That's what's happening.   When I crate the block device, there's no
MAJOR/MINOR.

It seems to be making character devices fine (I modified some of the
LDD3 examples to create a class,
and it works fine).

For character devices, udev is opening the /class/<name>/dev file.
For block devices, its NOT opening the /block/<partition name>/dev
file.

What's a good way to debug udevd?  Is there a way to run it without
forks?
Or is there magic to debug a forking process (catch/follow-fork seems
crude and only works
once).

marty

> -----Original Message-----
> From: linux-hotplug-devel-bounces@lists.sourceforge.net 
> [mailto:linux-hotplug-devel-bounces@lists.sourceforge.net] On 
> Behalf Of Kay Sievers
> Sent: Wednesday, April 11, 2007 5:18 AM
> To: Leisner, Martin
> Cc: linux-hotplug-devel@lists.sourceforge.net
> Subject: Re: not dynamically creating disk device nodes
> 
> On 4/9/07, Leisner, Martin <Martin.Leisner@xerox.com> wrote:
> > I'm trying to use udev-092 on linux-2.6.10.
> >
> > Most things work.
> >
> > udevstart works fine.
> >
> > But when I start playing around with fdisk, the device nodes aren't
> > getting erased/created
> > for the hard drive (udevstart had no problem figuring this out)..
> >
> > udevd says:
> >
> > udevd[1163]: udev_event_run: seq 707 forked, pid [1168], 
> 'add' 'block',
> > 0 seconds old
> > udevd-event[1168]: udev_db_get_device: no db file to read
> > /dev/.udev/db/block@sda: No such file or directory
> > udevd-event[1168]: udev_db_get_device: no db file to read
> > /dev/.udev/db/block@sda: No such file or directory
> > udevd-event[1168]: run_program: '/lib/udev/vol_id --export
> > /dev/.tmp-0-0'
> 
> Udev does not seem to get the correct major/minor number for the
> device, "0-0" looks wrong.
> 
> It is likely, that the udev daemon (10 months old) expects
> MAJOR/MINOR-values in the event environment, but that kernel (2.5
> years old) doesn't export it.
> 
> Udevstart reads that information from the "dev" file in sysfs, that's
> why it may work just fine.
> 
> Kay
> 
> --------------------------------------------------------------
> -----------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the 
> chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CIDÞVDEV
> _______________________________________________
> 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
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 4+ messages in thread

* RE: not dynamically creating disk device nodes
  2007-04-11  9:17 not dynamically creating disk device nodes Kay Sievers
  2007-04-12 21:57 ` Leisner, Martin
@ 2007-04-12 22:15 ` Kay Sievers
  1 sibling, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2007-04-12 22:15 UTC (permalink / raw)
  To: linux-hotplug

On Thu, 2007-04-12 at 18:02 -0400, Leisner, Martin wrote:
> That's what's happening.   When I crate the block device, there's no
> MAJOR/MINOR.
> 
> It seems to be making character devices fine (I modified some of the
> LDD3 examples to create a class,
> and it works fine).
> 
> For character devices, udev is opening the /class/<name>/dev file.
> For block devices, its NOT opening the /block/<partition name>/dev
> file.

We added stuff to the kernel, to make udev more reliable, and this
version of udev depends on a newer kernel. I suggest running an older
udev or a newer kernel.

> What's a good way to debug udevd?  Is there a way to run it without
> forks?

It will always fork, the daemon just handles the event queue.

> Or is there magic to debug a forking process (catch/follow-fork seems
> crude and only works
> once).

You can set the log level in /etc/udev/udev.conf or dynamically with
udevcontrol. And strace -f should work too, if the log does not provide
the needed information.

Kay


> > -----Original Message-----
> > From: linux-hotplug-devel-bounces@lists.sourceforge.net 
> > [mailto:linux-hotplug-devel-bounces@lists.sourceforge.net] On 
> > Behalf Of Kay Sievers
> > Sent: Wednesday, April 11, 2007 5:18 AM
> > To: Leisner, Martin
> > Cc: linux-hotplug-devel@lists.sourceforge.net
> > Subject: Re: not dynamically creating disk device nodes
> > 
> > On 4/9/07, Leisner, Martin <Martin.Leisner@xerox.com> wrote:
> > > I'm trying to use udev-092 on linux-2.6.10.
> > >
> > > Most things work.
> > >
> > > udevstart works fine.
> > >
> > > But when I start playing around with fdisk, the device nodes aren't
> > > getting erased/created
> > > for the hard drive (udevstart had no problem figuring this out)..
> > >
> > > udevd says:
> > >
> > > udevd[1163]: udev_event_run: seq 707 forked, pid [1168], 
> > 'add' 'block',
> > > 0 seconds old
> > > udevd-event[1168]: udev_db_get_device: no db file to read
> > > /dev/.udev/db/block@sda: No such file or directory
> > > udevd-event[1168]: udev_db_get_device: no db file to read
> > > /dev/.udev/db/block@sda: No such file or directory
> > > udevd-event[1168]: run_program: '/lib/udev/vol_id --export
> > > /dev/.tmp-0-0'
> > 
> > Udev does not seem to get the correct major/minor number for the
> > device, "0-0" looks wrong.
> > 
> > It is likely, that the udev daemon (10 months old) expects
> > MAJOR/MINOR-values in the event environment, but that kernel (2.5
> > years old) doesn't export it.
> > 
> > Udevstart reads that information from the "dev" file in sysfs, that's
> > why it may work just fine.
> > 
> > Kay
> > 
> > --------------------------------------------------------------
> > -----------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the 
> > chance to share your
> > opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge
> > &CIDÞVDEV
> > _______________________________________________
> > 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
> > 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2007-04-12 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-11  9:17 not dynamically creating disk device nodes Kay Sievers
2007-04-12 21:57 ` Leisner, Martin
2007-04-12 22:15 ` Kay Sievers
  -- strict thread matches above, loose matches on Subject: below --
2007-04-09 21:54 Leisner, Martin

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).