* Assumptions in start_udev regarding the loop device
@ 2005-02-10 6:25 C. Linus Hicks
2005-02-10 8:03 ` Kay Sievers
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: C. Linus Hicks @ 2005-02-10 6:25 UTC (permalink / raw)
To: linux-hotplug
Okay, so as I was investigating the problem I am having and whether or
not it might be fixed in the latest version of udev, I am faced with the
fact that the issue I see is actually because of alterations Red Hat has
made. The thing is, I would guess they made the specific change I have a
problem with because of a perceived shortcoming of udev.
This is on a RHEL4 beta-2 system, which is using udev-039-6.
The Red Hat version alters start_udev in the make_extra_nodes function
adding a call to MAKEDEV to create loop0 - loop7 (among others). The
problem I have with this is that it takes no account for how many loop
devices are actually enabled in the system. If I add 'options loop
max_loop%6' to my modprobe.conf, when the system re-boots, I still get
only eight loop devices in /dev.
They have hard-coded the number of loop device files to make!?
I searched the archives, but I couldn't find any references to this
issue, so perhaps the udev developers don't perceive a problem? Is the
act of creating loop device files considered to be out of the scope of
the project? Red Hat's solution just happens to connect it there. So
because of my lack of clarity here, I have cross-posted this message.
At this point, I'm guessing a solution to the problem is not in the
works. I have altered my start_udev to 'MAKEDEV loop' so that it will
use /etc/makedev.d/linux-2.6.x to figure out how many to make. That
seems like a better, though imperfect solution. You only have to make
sure that your max_loop option value matches what's in makedev.d to get
the right number of loop device files.
A better solution would be to be able to query how many loop devices are
supported, but I haven't found a way to do this. And actually, shouldn't
this be handled at module load time, rather than system boot time?
(Isn't there a way to create device files when a module is loaded?)
Surely others are having this issue?
Suggestion to Red Hat: Don't hard-code eight loop devices. Change it to
use the value from makedev.d.
--
C. Linus Hicks <lhicks at nc dot rr dot com>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread
* Re: Assumptions in start_udev regarding the loop device
2005-02-10 6:25 Assumptions in start_udev regarding the loop device C. Linus Hicks
@ 2005-02-10 8:03 ` Kay Sievers
2005-02-10 9:09 ` Marco d'Itri
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2005-02-10 8:03 UTC (permalink / raw)
To: linux-hotplug
On Thu, 2005-02-10 at 01:25 -0500, C. Linus Hicks wrote:
> Okay, so as I was investigating the problem I am having and whether or
> not it might be fixed in the latest version of udev, I am faced with the
> fact that the issue I see is actually because of alterations Red Hat has
> made. The thing is, I would guess they made the specific change I have a
> problem with because of a perceived shortcoming of udev.
Why do we need to create these nodes with a script? Loop-devices are
in /sys/block/loop* and udevstart should create all of them.
If the modules is loaded later, the hotplug events should create all of
the nodes.
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread
* Re: Assumptions in start_udev regarding the loop device
2005-02-10 6:25 Assumptions in start_udev regarding the loop device C. Linus Hicks
2005-02-10 8:03 ` Kay Sievers
@ 2005-02-10 9:09 ` Marco d'Itri
2005-02-10 15:40 ` Harald Hoyer
2005-02-11 16:46 ` C. Linus Hicks
3 siblings, 0 replies; 5+ messages in thread
From: Marco d'Itri @ 2005-02-10 9:09 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
On Feb 10, Kay Sievers <kay.sievers@vrfy.org> wrote:
> Why do we need to create these nodes with a script? Loop-devices are
Because nothing loads the module.
--
ciao,
Marco
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Assumptions in start_udev regarding the loop device
2005-02-10 6:25 Assumptions in start_udev regarding the loop device C. Linus Hicks
2005-02-10 8:03 ` Kay Sievers
2005-02-10 9:09 ` Marco d'Itri
@ 2005-02-10 15:40 ` Harald Hoyer
2005-02-11 16:46 ` C. Linus Hicks
3 siblings, 0 replies; 5+ messages in thread
From: Harald Hoyer @ 2005-02-10 15:40 UTC (permalink / raw)
To: linux-hotplug
Marco d'Itri wrote:
> On Feb 10, Kay Sievers <kay.sievers@vrfy.org> wrote:
>
>
>>Why do we need to create these nodes with a script? Loop-devices are
>
> Because nothing loads the module.
correct... chicken and egg... no module autoloading without a device node to
trigger it, and no device node created by udev without the loaded module.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread
* Re: Assumptions in start_udev regarding the loop device
2005-02-10 6:25 Assumptions in start_udev regarding the loop device C. Linus Hicks
` (2 preceding siblings ...)
2005-02-10 15:40 ` Harald Hoyer
@ 2005-02-11 16:46 ` C. Linus Hicks
3 siblings, 0 replies; 5+ messages in thread
From: C. Linus Hicks @ 2005-02-11 16:46 UTC (permalink / raw)
To: linux-hotplug
On Thu, 2005-02-10 at 16:40 +0100, Harald Hoyer wrote:
> Marco d'Itri wrote:
> > On Feb 10, Kay Sievers <kay.sievers@vrfy.org> wrote:
> >
> >
> >>Why do we need to create these nodes with a script? Loop-devices are
> >
> > Because nothing loads the module.
>
> correct... chicken and egg... no module autoloading without a device node to
> trigger it, and no device node created by udev without the loaded module.
The following in from an interaction on the nahant-beta-list:
> On Thu, 2005-02-10 at 15:31 -0500, Jeremy Katz wrote:
> > So, the reasoning for this is that loop devices are something of a
> > chicken and egg problem. You normally get the loop module loaded by
> > opening /dev/loop0 and getting a kmod call. But, with udev, the device
> > node doesn't get created until the module is loaded. So, we go ahead
> > and create the first n loop devs now and so after you mount your first
> > one, the loop module will get loaded (with your option
> > from /etc/modprobe.conf) and then the rest of the devices will get
> > created.
However, this is not what happens on my system, using the kernel from
the RHEL4 beta-2 CD.
[root@lh4 dev]# uname -a
Linux lh4.linush.net 2.6.9-1.648_EL #1 Tue Oct 26 12:15:22 EDT 2004 x86_64 x86_64 x86_64 GNU/Linux
With the above kernel, if I use a value greater than 224 for the
max_loop option in modprobe.conf, I get an out of memory error, but
that's not a hotplug issue. When the module is successfully loaded, I
get this:
Feb 10 18:34:15 lh4 kernel: loop: loaded (max 224 devices)
Feb 10 18:35:06 lh4 hald[2710]: Timed out waiting for hotplug event 327. Rebasing to 329
Feb 10 18:35:10 lh4 hald[2710]: Timed out waiting for hotplug event 336. Rebasing to 339
Feb 10 18:35:18 lh4 udev[4842]: creating device node '/dev/loop0'
Feb 10 18:35:20 lh4 hald[2710]: Timed out waiting for hotplug event 346. Rebasing to 349
Feb 10 18:35:23 lh4 udev[4848]: creating device node '/dev/loop1'
Feb 10 18:35:23 lh4 udev[4842]: error: timeout reached, event probably not handled correctly
Feb 10 18:35:25 lh4 05-pam_console.dev[4949]: Restoring console permissions for /dev/loop0
Feb 10 18:35:35 lh4 hald[2710]: Timed out waiting for hotplug event 356. Rebasing to 359
Feb 10 18:36:02 lh4 hald[2710]: Timed out waiting for hotplug event 366. Rebasing to 369
Feb 10 18:36:18 lh4 hald[2710]: Timed out waiting for hotplug event 376. Rebasing to 379
Feb 10 18:36:33 lh4 hald[2710]: Timed out waiting for hotplug event 386. Rebasing to 389
Feb 10 18:37:00 lh4 hald[2710]: Timed out waiting for hotplug event 396. Rebasing to 399
Feb 10 18:37:15 lh4 hald[2710]: Timed out waiting for hotplug event 406. Rebasing to 409
Feb 10 18:37:42 lh4 hald[2710]: Timed out waiting for hotplug event 416. Rebasing to 419
Feb 10 18:38:00 lh4 hald[2710]: Timed out waiting for hotplug event 426. Rebasing to 429
Feb 10 18:38:24 lh4 hald[2710]: Timed out waiting for hotplug event 436. Rebasing to 439
Feb 10 18:38:40 lh4 hald[2710]: Timed out waiting for hotplug event 446. Rebasing to 449
Feb 10 18:39:01 lh4 hald[2710]: Timed out waiting for hotplug event 456. Rebasing to 459
Feb 10 18:39:20 lh4 hald[2710]: Timed out waiting for hotplug event 466. Rebasing to 469
Feb 10 18:39:36 lh4 hald[2710]: Timed out waiting for hotplug event 476. Rebasing to 479
Feb 10 18:40:01 lh4 hald[2710]: Timed out waiting for hotplug event 486. Rebasing to 489
Feb 10 18:40:17 lh4 hald[2710]: Timed out waiting for hotplug event 496. Rebasing to 499
Feb 10 18:40:38 lh4 hald[2710]: Timed out waiting for hotplug event 506. Rebasing to 509
Feb 10 18:40:58 lh4 hald[2710]: Timed out waiting for hotplug event 516. Rebasing to 519
Feb 10 18:41:16 lh4 hald[2710]: Timed out waiting for hotplug event 526. Rebasing to 529
Feb 10 18:41:39 lh4 hald[2710]: Timed out waiting for hotplug event 536. Rebasing to 539
Feb 10 18:46:24 lh4 udev[6272]: creating device node '/dev/loop196'
Feb 10 18:46:26 lh4 udev[6272]: error: timeout reached, event probably not handled correctly
Feb 10 18:46:27 lh4 udev[6274]: creating device node '/dev/loop206'
Feb 10 18:46:27 lh4 05-pam_console.dev[6284]: Restoring console permissions for /dev/loop196
Feb 10 18:46:28 lh4 udev[6276]: creating device node '/dev/loop216'
Feb 10 18:46:28 lh4 udev[6277]: creating device node '/dev/loop217'
Feb 10 18:46:29 lh4 05-pam_console.dev[6290]: Restoring console permissions for /dev/loop206
Feb 10 18:46:29 lh4 udev[6278]: creating device node '/dev/loop218'
Feb 10 18:46:30 lh4 05-pam_console.dev[6296]: Restoring console permissions for /dev/loop216
Feb 10 18:46:30 lh4 05-pam_console.dev[6298]: Restoring console permissions for /dev/loop217
Feb 10 18:46:30 lh4 05-pam_console.dev[6300]: Restoring console permissions for /dev/loop218
And I end up with this in /dev:
[root@lh4 dev]# ls -l loop*
brw-rw---- 1 root disk 7, 0 Feb 10 18:30 loop0
brw-rw---- 1 root disk 7, 1 Feb 10 18:30 loop1
brw-rw---- 1 root disk 7, 196 Feb 10 18:46 loop196
brw-r----- 1 root disk 7, 2 Feb 10 18:30 loop2
brw-rw---- 1 root disk 7, 206 Feb 10 18:46 loop206
brw-rw---- 1 root disk 7, 216 Feb 10 18:46 loop216
brw-rw---- 1 root disk 7, 217 Feb 10 18:46 loop217
brw-rw---- 1 root disk 7, 218 Feb 10 18:46 loop218
brw-r----- 1 root disk 7, 3 Feb 10 18:30 loop3
brw-r----- 1 root disk 7, 4 Feb 10 18:30 loop4
brw-r----- 1 root disk 7, 5 Feb 10 18:30 loop5
brw-r----- 1 root disk 7, 6 Feb 10 18:30 loop6
brw-r----- 1 root disk 7, 7 Feb 10 18:30 loop7
Is this a hotplug issue? Is it Red Hat induced? Could it be an issue
specific to the architecture?
--
C. Linus Hicks <lhicks at nc dot rr dot com>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2005-02-11 16:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-10 6:25 Assumptions in start_udev regarding the loop device C. Linus Hicks
2005-02-10 8:03 ` Kay Sievers
2005-02-10 9:09 ` Marco d'Itri
2005-02-10 15:40 ` Harald Hoyer
2005-02-11 16:46 ` C. Linus Hicks
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).