1 |
On Saturday, September 17, 2011 06:40:03 PM Robin H. Johnson wrote: |
2 |
> On Fri, Sep 16, 2011 at 10:36:27AM +0200, Joost Roeleveld wrote: |
3 |
> (The other reason I think systemd and udev might merge at some point, or |
4 |
> at least have good IPC between them, because there is a potential for |
5 |
> speed gains there). |
6 |
|
7 |
If udev and systemd merge, what will happen with people not using systemd? |
8 |
|
9 |
I don't see any added benefit from using DBUS on my servers. |
10 |
|
11 |
> > > udev runs that rule as soon as the hardware turns up, which is often |
12 |
> > > before localmount. |
13 |
> > |
14 |
> > I have doubts about having all these things handled by udev. As you |
15 |
> > said, |
16 |
> > there is an init-script that handles this. Is the ultimate goal to get |
17 |
> > rid of init-scripts and have everything done automagically? |
18 |
> |
19 |
> The rule is really useful & important if you plug in a USB or Firewire |
20 |
> sound card at some point after boot. If you already had it configured a |
21 |
> previous time, that rule will restore your volume settings :-). |
22 |
|
23 |
udev knows the sound card is removable (USB, Firewire,...) or "fixed" (PCI, |
24 |
ISA,...) |
25 |
For removable devices, yes, these extra scripts make sense. But why have this |
26 |
same mechanism forced with non-removable hardware as the same can easily (and |
27 |
already is) be handled by existing init-scripts that run after localmount? |
28 |
|
29 |
> The other parts of that init script are valuable still, but the volume |
30 |
> restore is just a crutch for failing to load the volume when the device |
31 |
> was first detected. If you have a soundcard that makes a pop when your |
32 |
> system boots, that's a bug caused by this. |
33 |
|
34 |
My sound card doesn't pop, actually. So I guess I am lucky I don't see this |
35 |
bug on my system. |
36 |
|
37 |
> > > Just because there are no visible errors, doesn't mean that they |
38 |
> > > don't |
39 |
> > > exist. This move to encourage initramfs is to ensure that there |
40 |
> > > isn't |
41 |
> > > any major breakage incidents soon. What if udev upstream suddenely |
42 |
> > > starts hard requiring /usr to mounted, and not doing retries at all. |
43 |
> > > How many systems are going to break, and users going to complain |
44 |
> > > about |
45 |
> > > needing to use livecds to recover? |
46 |
> > |
47 |
> > A lot. And those will be very vocal. |
48 |
> > I have a few goals with this thread and one of them is to try to figure |
49 |
> > out how best to avoid users to get affected by this. |
50 |
> |
51 |
> For now, users having an initramfs ahead of time is the best option to |
52 |
> avoid future breakages. |
53 |
|
54 |
That, or have the logic of the initramfs in localmount and have udev wait till |
55 |
after localmount is run. |
56 |
|
57 |
> > > DEVTMPFS creates the first batch, and udev creates the rest. |
58 |
> > > |
59 |
> > > The deciding case then becomes: |
60 |
> > > - Is the device for your /usr entry in fstab created by udev or |
61 |
> > > |
62 |
> > > something else? |
63 |
> > > |
64 |
> > > MD: done by devtmpfs |
65 |
> > > LVM: done by udev+lvm |
66 |
> > > by-uuid/by-label: done by udev |
67 |
> > > |
68 |
> > > by-uuid and by-label present a lot of annoyance to the minimal |
69 |
> > > initramfs. We have to ensure that we explicitly support them, which |
70 |
> > > has |
71 |
> > > increased the complexity of the initramfs. |
72 |
> > |
73 |
> > My /usr is on LVM. That requires udev. |
74 |
> > |
75 |
> > My understanding is: |
76 |
> > - udev needs /usr to be mounted to work |
77 |
> |
78 |
> Correct. |
79 |
> |
80 |
> > - udev is needed to sort out LVM to get access to /usr |
81 |
> |
82 |
> Incorrect. But perhaps not for the reason that you think. |
83 |
> |
84 |
> Using genkernel's initramfs here as an example, this is the sequence of |
85 |
> LVM commands that run: |
86 |
> vgscan |
87 |
> vgchange -ay --sysinit |
88 |
> |
89 |
> That --sysinit part is important, as it tells LVM to avoid locking (and |
90 |
> some interaction with udev), and then LVM has fallback code to create |
91 |
> the symlinks and other device nodes in /dev. What udev CAN do is create |
92 |
> all of the by-label/by-uuid bits above. The fallback code in LVM is very |
93 |
> complex, just for the case of handling udev not being there yet. |
94 |
> |
95 |
> > And why can't this be implemented in localmount? |
96 |
> |
97 |
> /etc/init.d/lvm does it on your system. |
98 |
|
99 |
Ok, so have localmount depend on /etc/init.d/localmount and the problem is |
100 |
solved. |
101 |
|
102 |
-- |
103 |
Joost |