Gentoo Archives: gentoo-amd64

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Please get me straight about sysvinit vs. systemd, udev vs eudev vs mdev, virtuals and other things...
Date: Sun, 02 Mar 2014 17:45:54
Message-Id: CADPrc837SNpp2oY=poNQL5ckyWQBW-aLNs2Fs+xKgpdKsS-=GA@mail.gmail.com
In Reply to: [gentoo-amd64] Please get me straight about sysvinit vs. systemd, udev vs eudev vs mdev, virtuals and other things... by Mark Knecht
1 On Sun, Mar 2, 2014 at 10:57 AM, Mark Knecht <markknecht@×××××.com> wrote:
2 > Hi all,
3 > I'd like to check in and get some education concerning future
4 > configuration of my Gentoo machines. Thanks in advance.
5 >
6 > In the last few days there is a news announcement about needing to
7 > change kernel my configuration to enable CONFIG_FHANDLE to support
8 > udev-210. I'm currently at udev-208 and virtual/udev-208-r1 so no big
9 > deal yet. However reading the news announcement it appears this has
10 > more to do with systemd than anything else and I don't use systemd so
11 > does/will this effect my machines?
12
13 Yes, it will; udev (independently of systemd) is using FHANDLE to find
14 the devices in the computer.
15
16 udev is part of systemd, but it can be used separately. This is
17 supported by upstream (i.e., systemd). The change in the kernel config
18 is needed by udev.
19
20 > NOTE: I have no problem I know about today enabling CONFIG_FHANDLE
21 > if it's recommended.
22
23 It is: udev will not work without it. Even more: eudev (when they
24 catch up) will not work without it either, since eudev does no
25 original work; they just exorcise systemd from udev.
26
27 > That said there's an interesting (if it is to be believed) little
28 > rant thread over the last couple of days on LKML about Debian
29 > leadership forcing people into systemd.
30
31 The Debian Technical Committee took the technical decision of using
32 systemd as default init system. There is no "forcing" here; Debian is
33 ruled by a Constitution, and they (very slowly) followed their rules
34 and laws to reach that decision.
35
36 > I think the Gentoo devs forked
37 > udev to make either mdev or eudev but when it was announced it was too
38 > new for me so I just let it go by.
39
40 Gentoo, by default, uses udev without systemd. Again, this is
41 supported by upstream (i.e., systemd), nothing special about it.
42 *Some* Gentoo developers "forked" systemd into eudev, so you can have
43 a "udev without systemd" (although, as stated above, upstream supports
44 udev without systemd). I don't know the exact numbers, but it's my
45 impression (by reading -dev and -user), that eudev is used in Gentoo
46 (and only Gentoo) by a handful of people. The great majority is using
47 sys-fs/udev, and I'm willing to bet that more people are using systemd
48 directly than eudev.
49
50 > Maybe now it's time for me to look
51 > into making a change of some type? I see eudev in portage, but not
52 > mdev.
53
54 Using eudev will gain you nothing; the FHANDLE change will reach them
55 eventually. If you use mdev, you will have a noticeable loss of
56 functionality. I think even less people use mdev than eudev.
57
58 > A (really, really, really) quick scan of the current install docs
59 > makes me think sysvinit/OpenRC/udev is still the default for new
60 > installs. Is this true?
61
62 Yes, it's true, and no one will propose changing this, at least in the
63 near future. And even if systemd becomes the standard Gentoo init
64 system, OpenRC will be (almost surely) supported until the end of
65 times.
66
67 > If so why is this kernel change being
68 > required?
69
70 Because is new functionality provided by the kernel required by
71 *udev*, not (necessarily) systemd. Happens all the time; new
72 technology in the kernel is pretty useless if userspace doesn't start
73 taking advantage of it.
74
75 > Also, I seem to have virtual/udev installed which says it's about
76 > enabling switching between udev & eudev. However there are no files
77 > associated with virtual/udev. (equery files virtual/udev returns
78 > nothing)
79
80 That's why it's a virtual; a virtual pulls in different
81 implementations of the (in theory) same functionality.
82
83 > It appears I cannot install eudev without removing udev so
84 > this seems a big step to take:
85 [ snip]
86
87 It is a big step to take, and it will gain you nothing: eventually,
88 eudev *will* require FHANDLE, unless they diverge even more from
89 upstream, a thing I believe they cannot afford to do.
90
91 > At this point I'm not even sure what my other questions might be as
92 > I'm just trying to get my head around what others are using these
93 > days.
94
95 Well, it's undeniable that systemd usage is on the raising everywhere,
96 including Gentoo (specially since GNOME pulls it in). I myself use
97 systemd, and could not be happier.
98
99 However, OpenRC is (and will be for the foreseeable future) the
100 default init system.
101
102 > I do have a second Gentoo install on this system on an SSD so
103 > (once updated) I could do a switch there as a test.
104
105 My suggestion is for you to enable FHANDLE. From the kernel:
106
107 """
108 config FHANDLE
109 bool "open by fhandle syscalls"
110 select EXPORTFS
111 help
112 If you say Y here, a user level program will be able to map
113 file names to handle and then later use the handle for
114 different file system operations. This is useful in implementing
115 userspace file servers, which now track files using handles instead
116 of names. The handle would remain the same even if file names
117 get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
118 syscalls.
119 """
120
121 It enables a couple of syscalls, and I don't think it will increase
122 much your kernel size. All systemd forks (including eudev) will need
123 it at some point, since it makes things easier for the developers. You
124 *could* use mdev instead of udev, but is **NOT** a drop in
125 replacement: you *will* lose some (if not much) functionality.
126
127 So just enable the thing and go on with your life.
128
129 My 0.02 ${CURRENCY}.
130
131 Regards.
132 --
133 Canek Peláez Valdés
134 Posgrado en Ciencia e Ingeniería de la Computación
135 Universidad Nacional Autónoma de México

Replies