Re: udev event completion order

2006-01-03 Thread Gabor Gombas
On Mon, Jan 02, 2006 at 08:19:30PM +0100, Adrian von Bidder wrote:

> 'just plug' is the watchword. New device model just needs a reboot - in 
> some circumstances device numbering is random without hardware changes and 
> without software changes.

So it exposes a bug more frequently than before. So why not fix the
bug instead of trying to paper over it forever? As a user, a disk
changing its name if I plug it to a different SATA connector that
happens to be connected to a different chip on the MB is _exactly_ the
same problem as the name change on a single reboot.

Any solution must work equally well for the "plugged in at a different
location" case or it is useless.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -



Re: udev event completion order

2006-01-02 Thread Adrian von Bidder
On Monday 02 January 2006 14.48, Gabor Gombas wrote:
> On Wed, Dec 21, 2005 at 07:29:16PM +, Darren Salt wrote:
> > I'd call that broken, just as I consider udev (076) to be broken given
> > that it breaks expectations wrt device naming. (Here, it swapped the
> > names of the DVD drives (drivers are built-in) and sound devices
> > (drivers are modular).)
>
> But that was the case since ages for SCSI (and nowadays SATA) devices.
> No modules, no udev, just plug a new SATA/SCSI disk to the controller

...

'just plug' is the watchword.  New device model just needs a reboot - in 
some circumstances device numbering is random without hardware changes and 
without software changes.

-- vbi

-- 
Beware of the FUD - know your enemies. This week
* The Alexis de Toqueville Institue *
http://fortytwo.ch/opinion/adti


pgp7j5JxFO0KA.pgp
Description: PGP signature


Re: udev event completion order

2006-01-02 Thread Gabor Gombas
On Wed, Dec 21, 2005 at 07:29:16PM +, Darren Salt wrote:

> I'd call that broken, just as I consider udev (076) to be broken given that
> it breaks expectations wrt device naming. (Here, it swapped the names of the
> DVD drives (drivers are built-in) and sound devices (drivers are modular).)

But that was the case since ages for SCSI (and nowadays SATA) devices.
No modules, no udev, just plug a new SATA/SCSI disk to the controller
that happens to be detected first and all disks on the other controller
gets renamed. udev at least provides persistent naming using
/dev/disk/by-{id,label,path,uuid}.

This is also true for any add-on cards: just plug them to different PCI
slots and the attached devices get renamed. This is not a new problem at
all, it is just exposed more frequently as device handling becomes more
and more dynamic. Again, udev now provides an interface to manually
override these name changes if you want to.

Btw. looking at /usr/src/linux/init/do_mounts.c, the name parsing is
already sysfs-based so it would not be too hard to implement support for
something like
"root=/sys/devices/pci:00/:00:1e.0/:02:0b.2/usb5/5-2/5-2.4/5-2.4:1.0/host0/target0:0:0/0:0:0:0"
So if you worry that the "root=/dev/sda1" style is not
reliable (well, it never was), then talk to the kernel guys.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev event completion order

2005-12-21 Thread Andrew Vaughan
On Thu, 22 Dec 2005 06:29, Darren Salt wrote:
> I demand that Alexander E. Patrakov may or may not have written...
>
> > Kay Sievers wrote:
> >> There is also the plan to do parallel device probing inside the kernel
> >> some day, that will make the situation of relying on kernel names even
> >> more fragile.
> >
> > Right, this means that the way of passing "root=/dev/hdc2" will no
> > longer work because /dev/hdc will sometimes become /dev/hde.
>
That will also break scripts/apps that manipulate disks/partitions.

This could easily result in some-one restoring a backup over the wrong disk. 

Andrew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev event completion order

2005-12-21 Thread Darren Salt
I demand that Alexander E. Patrakov may or may not have written...

> Kay Sievers wrote:
>> There is also the plan to do parallel device probing inside the kernel
>> some day, that will make the situation of relying on kernel names even
>> more fragile.

> Right, this means that the way of passing "root=/dev/hdc2" will no longer
> work because /dev/hdc will sometimes become /dev/hde.

I'd call that broken, just as I consider udev (076) to be broken given that
it breaks expectations wrt device naming. (Here, it swapped the names of the
DVD drives (drivers are built-in) and sound devices (drivers are modular).)

If the parallel probing is done such that the naming remains predicatable,
that's good. Whether it's faster doesn't matter - userspace isn't affected
and doesn't require modification, and that's a good thing.

> If you are serious about going to implement this, first add (to
> linux-2.6.16?) a boot-time warning if the kernel is booting without
> initramfs. The warning should say something like this:

> WARNING: you have booted the kernel without initramfs and passed an
> explicit root device name.

I see no problem with booting like that. I've always used the root device
name; why should I forced to change should a kernel upgrade become necessary
just because of some should-be-in-2.7.x [1] breakage?

> This will no longer work when the kernel will probe devices in parallel
> (i.e., since linux-2.6.??) because device ordering will be random. Please
> create an initramfs that mounts the root device using some stable
> attribute, like label or UUID.

That'd be "stable and duplicatable", and I fully expect somebody to run into
that sooner or later...


[1] Heated discussion, anybody? ;-)

-- 
| Darren Salt | nr. Ashington, | d youmustbejoking,demon,co,uk
| Debian, | Northumberland | s zap,tartarus,org
| RISC OS | Toon Army  | @
|   Kill all extremists!

I've got 256K of RAM, so why can't I run Windows 3.1?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev event completion order

2005-12-20 Thread Alexander E. Patrakov

Kay Sievers wrote:


There is also the plan to do parallel device probing inside the kernel
some day, that will make the situation of relying on kernel names even
more fragile.
 

Right, this means that the way of passing "root=/dev/hdc2" will no 
longer work because /dev/hdc will sometimes become /dev/hde. If you are 
serious about going to implement this, first add (to linux-2.6.16?) a 
boot-time warning if the kernel is booting without initramfs. The 
warning should say something like this:


WARNING: you have booted the kernel without initramfs and passed an 
explicit root device name. This will no longer work when the kernel will 
probe devices in parallel (i.e., since linux-2.6.??) because device 
ordering will be random. Please create an initramfs that mounts the root 
device using some stable attribute, like label or UUID.


--
Alexander E. Patrakov


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev event completion order (was: Re: Debian Installer team monthly meeting minutes (20051214 meeting))

2005-12-18 Thread Kay Sievers
On Sun, Dec 18, 2005 at 09:52:42AM +0100, Marco d'Itri wrote:
> On Dec 18, Darren Salt <[EMAIL PROTECTED]> wrote:
> 
> > An alternative appears to be to process events in series... or maybe 
> > delaying
> This was the precedent approach, and it's much slower (also, it cannot
> be implemented anymore with just udevd).

Right, you could request event-by-event from the kernel and wait for it
to finish for devices that you know to have initialized first, but that
sounds like a bad idea.

The whole "device enumeration by module load order"-thing never worked
too reliably and will never work again. Everybody just needs to get used
to the fact that while you can add and remove devices at any point in
time from a running system, it can never give predictable simple enumerations,
like the kernel names are.

We implemented persistent device links for disks, which is on almost all
distros today and SUSE has persistent network device names implemented
by automatically writing udev rules from the device event.
Persistent naming is the way to go and to work on improving and extending
the current system. The /dev/disk/* link model should work for other subsystems
in a similar way, it's just that somebody needs to do it. :)

There is also the plan to do parallel device probing inside the kernel
some day, that will make the situation of relying on kernel names even
more fragile.
I will remove the %e from the udev rules some day too, cause it never
worked correctly outside of udevstart and udevstart is also no longer
recommended to use cause you can't match on event properties which are
only available from the event itself but not in sysfs.

Thanks,
Kay


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: udev event completion order (was: Re: Debian Installer team monthly meeting minutes (20051214 meeting))

2005-12-18 Thread Marco d'Itri
On Dec 18, Darren Salt <[EMAIL PROTECTED]> wrote:

> An alternative appears to be to process events in series... or maybe delaying
This was the precedent approach, and it's much slower (also, it cannot
be implemented anymore with just udevd).

-- 
ciao,
Marco


signature.asc
Description: Digital signature