Gentoo Archives: gentoo-user

From: Jarry <mr.jarry@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: sata disk assignment mismatch...
Date: Sun, 17 Jan 2010 13:17:16
Message-Id: 4B530D1E.7090409@gmail.com
In Reply to: Re: [gentoo-user] Re: sata disk assignment mismatch... by Alan McKinnon
1 On 17. 1. 2010 11:30, Alan McKinnon wrote:
2
3 >> In between I got a reply from other mailing list saying
4 >> "it is not a bug, it is a feature!". And the reason for
5 >> this feature is udev - it creates dev-files dynamically
6 >> and sata port-numbers do not play any role for order
7 >> in which hard-drives are detected and dev-file created.
8 >> Maybe some udev-expert here could explain in which
9 >> order udev writes device-files for hard-disks (maybe
10 >> serial number, or vendor name?)...
11 >
12 > Generally it's the order they are found in.
13 >
14 > udev gives you the ability to dynamically create only the nodes you need
15 > without having to worry if you've left something out of MAKEDEV. To do this,
16 > the developer had to sacrifice your ability to predict what a device name will
17 > be.
18 >
19 > You actually don't care what the name of a thing in /dev/ is, it really
20 > doesn't matter. The kernel knows what they are by looking at the major and
21 > minor numbers and the name only exists while that instance of udev is running.
22 > To work with the device (eg mounting it), you should use some other
23 > characteristic of the device, like it's serial number or volume label. Which
24 > means things like /dev/sda3 should not appear in fstab.
25 >
26 > View it this way:
27 >
28 > You have a disk volume with a filesystem on it that you called "HOME", and you
29 > want to mount that filesystem to /home. You should just do that directly.
30 >
31 > The other way involves a completely useless extra step that the user doe snot
32 > even need to know about: You have a filesystem on it called "HOME", so you
33 > looked it up in some arcane table and found that it has the arbitrary name of
34 > /dev/sda3, so you mount /dev/sda3 to /home. Hmmmmmm, what's this extra step of
35 > looking something up somewhere? It serves no useful purpose, gives no extra
36 > information and is completely redundant.
37 >
38 > If all you are doing is making filesystems available for use, and you find you
39 > are getting involved with device names, then you are doing something contrary
40 > to current kernel/udev/userspace practice.
41
42 If your last paragraph ist true, then it is probably time
43 to rewrite Gentoo Handbook. I just checked it, especially
44 section 4 "Preparing the Disks" and 8 "Configuring your System"
45 and did not find a word about udev, and this new concept of
46 device files (maybe time to file bug concerning Gentoo doc?).
47
48 In Gentoo Handbook, device files are still used in fstab.
49 And what's even worse, there is no warning about what just
50 happened to me: user can have perfectly working system,
51 which he installed/configured using Gentoo Handbook.
52 Then he just adds one more hard-drive, and this renders
53 his system completely unusable, just because sudenly fstab
54 does not match with new dev-file names...
55
56 For me this is the 2nd day I've lost by reading about udev,
57 trying figure out how to make my system "udev-proof".
58 That's too much cost for just adding new hard-disk...
59
60 Jarry
61
62 --
63 _______________________________________________________________
64 This mailbox accepts e-mails only from selected mailing-lists!
65 Everything else is considered to be spam and therefore deleted.

Replies

Subject Author
Re: [gentoo-user] Re: sata disk assignment mismatch... Alan McKinnon <alan.mckinnon@×××××.com>