1 |
Am Sonntag 17 Januar 2010 11:30:00 schrieb Alan McKinnon: |
2 |
> On Saturday 16 January 2010 20:28:53 Jarry wrote: |
3 |
> > >> Now I installed one more sata-disk, attached to "sata4" |
4 |
> > >> position on mobo. But this changed the way how other |
5 |
> > >> disks are detected: |
6 |
> > >> |
7 |
> > >> Mobo: drive: system: |
8 |
> > >> sata1 160GB /dev/sdb |
9 |
> > >> sata2 160GB /dev/sdc |
10 |
> > >> sata3 dvdrw (not_detected) |
11 |
> > >> sata4 500GB /dev/sda |
12 |
> > |
13 |
> > ... |
14 |
> > |
15 |
> > > I don't know if that is normal behavior or a bug, |
16 |
> > |
17 |
> > In between I got a reply from other mailing list saying |
18 |
> > "it is not a bug, it is a feature!". And the reason for |
19 |
> > this feature is udev - it creates dev-files dynamically |
20 |
> > and sata port-numbers do not play any role for order |
21 |
> > in which hard-drives are detected and dev-file created. |
22 |
> > Maybe some udev-expert here could explain in which |
23 |
> > order udev writes device-files for hard-disks (maybe |
24 |
> > serial number, or vendor name?)... |
25 |
> |
26 |
> Generally it's the order they are found in. |
27 |
> |
28 |
> udev gives you the ability to dynamically create only the nodes you need |
29 |
> without having to worry if you've left something out of MAKEDEV. To do |
30 |
> this, the developer had to sacrifice your ability to predict what a device |
31 |
> name will be. |
32 |
> |
33 |
> You actually don't care what the name of a thing in /dev/ is, it really |
34 |
> doesn't matter. The kernel knows what they are by looking at the major and |
35 |
> minor numbers and the name only exists while that instance of udev is |
36 |
> running. To work with the device (eg mounting it), you should use some |
37 |
> other characteristic of the device, like it's serial number or volume |
38 |
> label. Which means things like /dev/sda3 should not appear in fstab. |
39 |
> |
40 |
> View it this way: |
41 |
> |
42 |
> You have a disk volume with a filesystem on it that you called "HOME", and |
43 |
> you want to mount that filesystem to /home. You should just do that |
44 |
> directly. |
45 |
> |
46 |
> The other way involves a completely useless extra step that the user doe |
47 |
> snot even need to know about: You have a filesystem on it called "HOME", |
48 |
> so you looked it up in some arcane table and found that it has the |
49 |
> arbitrary name of /dev/sda3, so you mount /dev/sda3 to /home. Hmmmmmm, |
50 |
> what's this extra step of looking something up somewhere? It serves no |
51 |
> useful purpose, gives no extra information and is completely redundant. |
52 |
> |
53 |
> If all you are doing is making filesystems available for use, and you find |
54 |
> you are getting involved with device names, then you are doing something |
55 |
> contrary to current kernel/udev/userspace practice. |
56 |
|
57 |
To add some more alternatives to that list: |
58 |
|
59 |
1) LVM. Logical volumes always get the same, user defined name, no matter what. |
60 |
2) User defined udev rules to name your devices whatever you like (Google: |
61 |
writing udev rules). |
62 |
|
63 |
Bye... |
64 |
|
65 |
Dirk |