On 17. 1. 2010 11:30, Alan McKinnon wrote:

In between I got a reply from other mailing list saying
"it is not a bug, it is a feature!". And the reason for
this feature is udev - it creates dev-files dynamically
and sata port-numbers do not play any role for order
in which hard-drives are detected and dev-file created.
Maybe some udev-expert here could explain in which
order udev writes device-files for hard-disks (maybe
serial number, or vendor name?)...

Generally it's the order they are found in.

udev gives you the ability to dynamically create only the nodes you need
without having to worry if you've left something out of MAKEDEV. To do this,
the developer had to sacrifice your ability to predict what a device name will
be.

You actually don't care what the name of a thing in /dev/ is, it really
doesn't matter. The kernel knows what they are by looking at the major and
minor numbers and the name only exists while that instance of udev is running.
To work with the device (eg mounting it), you should use some other
characteristic of the device, like it's serial number or volume label. Which
means things like /dev/sda3 should not appear in fstab.

View it this way:

You have a disk volume with a filesystem on it that you called "HOME", and you
want to mount that filesystem to /home. You should just do that directly.

The other way involves a completely useless extra step that the user doe snot
even need to know about: You have a filesystem on it called "HOME", so you
looked it up in some arcane table and found that it has the arbitrary name of
/dev/sda3, so you mount /dev/sda3 to /home. Hmmmmmm, what's this extra step of
looking something up somewhere? It serves no useful purpose, gives no extra
information and is completely redundant.

If all you are doing is making filesystems available for use, and you find you
are getting involved with device names, then you are doing something contrary
to current kernel/udev/userspace practice.

If your last paragraph ist true, then it is probably time
to rewrite Gentoo Handbook. I just checked it, especially
section 4 "Preparing the Disks" and 8 "Configuring your System"
and did not find a word about udev, and this new concept of
device files (maybe time to file bug concerning Gentoo doc?).

In Gentoo Handbook, device files are still used in fstab.
And what's even worse, there is no warning about what just
happened to me: user can have perfectly working system,
which he installed/configured using Gentoo Handbook.
Then he just adds one more hard-drive, and this renders
his system completely unusable, just because sudenly fstab
does not match with new dev-file names...

For me this is the 2nd day I've lost by reading about udev,
trying figure out how to make my system "udev-proof".
That's too much cost for just adding new hard-disk...

Jarry

--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.

Reply via email to