From: Joost Roeleveld <joost@antarean.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] udev and /usr
Date: Sun, 18 Sep 2011 17:22:42 +0200 [thread overview]
Message-ID: <3215539.x3CMH0d0eb@eve> (raw)
In-Reply-To: <robbat2-20110917T180602-009711973Z@orbis-terrarum.net>
On Saturday, September 17, 2011 06:40:03 PM Robin H. Johnson wrote:
> On Fri, Sep 16, 2011 at 10:36:27AM +0200, Joost Roeleveld wrote:
> (The other reason I think systemd and udev might merge at some point, or
> at least have good IPC between them, because there is a potential for
> speed gains there).
If udev and systemd merge, what will happen with people not using systemd?
I don't see any added benefit from using DBUS on my servers.
> > > udev runs that rule as soon as the hardware turns up, which is often
> > > before localmount.
> >
> > I have doubts about having all these things handled by udev. As you
> > said,
> > there is an init-script that handles this. Is the ultimate goal to get
> > rid of init-scripts and have everything done automagically?
>
> The rule is really useful & important if you plug in a USB or Firewire
> sound card at some point after boot. If you already had it configured a
> previous time, that rule will restore your volume settings :-).
udev knows the sound card is removable (USB, Firewire,...) or "fixed" (PCI,
ISA,...)
For removable devices, yes, these extra scripts make sense. But why have this
same mechanism forced with non-removable hardware as the same can easily (and
already is) be handled by existing init-scripts that run after localmount?
> The other parts of that init script are valuable still, but the volume
> restore is just a crutch for failing to load the volume when the device
> was first detected. If you have a soundcard that makes a pop when your
> system boots, that's a bug caused by this.
My sound card doesn't pop, actually. So I guess I am lucky I don't see this
bug on my system.
> > > Just because there are no visible errors, doesn't mean that they
> > > don't
> > > exist. This move to encourage initramfs is to ensure that there
> > > isn't
> > > any major breakage incidents soon. What if udev upstream suddenely
> > > starts hard requiring /usr to mounted, and not doing retries at all.
> > > How many systems are going to break, and users going to complain
> > > about
> > > needing to use livecds to recover?
> >
> > A lot. And those will be very vocal.
> > I have a few goals with this thread and one of them is to try to figure
> > out how best to avoid users to get affected by this.
>
> For now, users having an initramfs ahead of time is the best option to
> avoid future breakages.
That, or have the logic of the initramfs in localmount and have udev wait till
after localmount is run.
> > > DEVTMPFS creates the first batch, and udev creates the rest.
> > >
> > > The deciding case then becomes:
> > > - Is the device for your /usr entry in fstab created by udev or
> > >
> > > something else?
> > >
> > > MD: done by devtmpfs
> > > LVM: done by udev+lvm
> > > by-uuid/by-label: done by udev
> > >
> > > by-uuid and by-label present a lot of annoyance to the minimal
> > > initramfs. We have to ensure that we explicitly support them, which
> > > has
> > > increased the complexity of the initramfs.
> >
> > My /usr is on LVM. That requires udev.
> >
> > My understanding is:
> > - udev needs /usr to be mounted to work
>
> Correct.
>
> > - udev is needed to sort out LVM to get access to /usr
>
> Incorrect. But perhaps not for the reason that you think.
>
> Using genkernel's initramfs here as an example, this is the sequence of
> LVM commands that run:
> vgscan
> vgchange -ay --sysinit
>
> That --sysinit part is important, as it tells LVM to avoid locking (and
> some interaction with udev), and then LVM has fallback code to create
> the symlinks and other device nodes in /dev. What udev CAN do is create
> all of the by-label/by-uuid bits above. The fallback code in LVM is very
> complex, just for the case of handling udev not being there yet.
>
> > And why can't this be implemented in localmount?
>
> /etc/init.d/lvm does it on your system.
Ok, so have localmount depend on /etc/init.d/localmount and the problem is
solved.
--
Joost
next prev parent reply other threads:[~2011-09-18 15:23 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 14:33 [gentoo-dev] udev and /usr Joost Roeleveld
2011-09-15 15:07 ` Zac Medico
2011-09-15 16:04 ` Joost Roeleveld
2011-09-15 16:27 ` Zac Medico
2011-09-15 20:03 ` Joost Roeleveld
2011-09-15 20:14 ` Michał Górny
2011-09-15 20:37 ` Mike Frysinger
2011-09-15 20:45 ` "Paweł Hajdan, Jr."
2011-09-15 21:24 ` Brian Harring
2011-09-15 20:27 ` Rich Freeman
2011-09-15 21:56 ` Joost Roeleveld
2011-09-15 20:31 ` Robin H. Johnson
2011-09-15 22:05 ` Joost Roeleveld
2011-09-15 20:34 ` Zac Medico
2011-09-15 22:13 ` Joost Roeleveld
2011-09-15 22:27 ` Michał Górny
2011-09-16 6:02 ` Joost Roeleveld
2011-09-15 20:56 ` William Hubbs
2011-09-15 22:17 ` Joost Roeleveld
2011-09-15 18:29 ` Rich Freeman
2011-09-15 20:40 ` Joost Roeleveld
2011-09-15 20:54 ` Rich Freeman
2011-09-15 21:48 ` Joost Roeleveld
2011-09-16 0:32 ` Rich Freeman
2011-09-16 7:25 ` Joost Roeleveld
2011-09-16 7:29 ` Robin H. Johnson
2011-09-15 19:31 ` Luca Barbato
2011-09-15 20:33 ` Joost Roeleveld
2011-09-16 4:03 ` [gentoo-dev] " Duncan
2011-09-16 13:59 ` Rich Freeman
2011-09-25 6:35 ` Mike Frysinger
2011-09-25 9:53 ` Nirbheek Chauhan
2011-09-26 1:32 ` Mike Frysinger
2011-09-26 1:57 ` Nirbheek Chauhan
2011-09-26 2:27 ` Zac Medico
2011-09-26 4:35 ` Nirbheek Chauhan
2011-09-26 2:27 ` Mike Frysinger
2011-09-25 12:53 ` Rich Freeman
2011-09-25 23:16 ` "Paweł Hajdan, Jr."
2011-09-26 1:37 ` Mike Frysinger
2011-09-18 5:43 ` [gentoo-dev] " Luca Barbato
2011-09-18 12:38 ` Rich Freeman
2011-09-18 12:49 ` Michał Górny
2011-09-18 12:59 ` Nirbheek Chauhan
2011-09-18 14:27 ` Jorge Manuel B. S. Vicetto
2011-09-18 14:51 ` Michał Górny
2011-09-18 17:26 ` Nirbheek Chauhan
2011-09-19 8:15 ` Joshua Kinard
2011-09-19 8:25 ` Alec Warner
2011-09-19 8:44 ` Joshua Kinard
2011-09-19 8:33 ` Michał Górny
2011-09-19 8:57 ` Joshua Kinard
2011-09-19 9:10 ` Michał Górny
2011-09-19 10:30 ` Dale
2011-09-19 10:37 ` Joshua Kinard
2011-09-19 11:17 ` Arun Raghavan
2011-09-19 23:19 ` Joshua Kinard
2011-09-20 0:29 ` Rich Freeman
2011-09-20 2:08 ` Joshua Kinard
2011-09-20 2:50 ` Zac Medico
2011-09-20 6:48 ` Fabian Groffen
2011-09-19 17:36 ` Greg KH
2011-09-19 18:00 ` Rich Freeman
2011-09-19 21:46 ` Luca Barbato
2011-09-19 22:40 ` Greg KH
2011-09-19 22:57 ` Nirbheek Chauhan
2011-09-20 3:53 ` Zac Medico
2011-09-19 23:24 ` Joshua Kinard
2011-09-18 19:27 ` Zac Medico
2011-09-15 19:41 ` Robin H. Johnson
2011-09-15 21:00 ` Joost Roeleveld
2011-09-15 22:18 ` Robin H. Johnson
2011-09-16 8:36 ` Joost Roeleveld
2011-09-16 18:06 ` [gentoo-dev] " Duncan
2011-09-17 6:16 ` Joost Roeleveld
2011-09-17 14:10 ` Rich Freeman
2011-09-19 8:25 ` Joshua Kinard
2011-09-17 18:40 ` [gentoo-dev] " Robin H. Johnson
2011-09-18 15:22 ` Joost Roeleveld [this message]
2011-09-18 18:14 ` [gentoo-dev] " Duncan
2011-09-18 18:59 ` Rich Freeman
2011-09-19 8:03 ` Nicolas Sebrecht
2011-09-19 7:59 ` [gentoo-dev] " Joshua Kinard
2011-09-19 8:25 ` Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3215539.x3CMH0d0eb@eve \
--to=joost@antarean.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox