[systemd-devel] [PATCH 2/2] units: add RequiresMountsFor=/usr/… to various systemd service files

Lennart Poettering lennart at poettering.net
Thu Aug 14 10:01:27 PDT 2014

On Tue, 22.07.14 14:45, Jon Severinsson (jon at severinsson.net) wrote:

> At Tuesday 22 July 2014 13:01:24 Lennart Poettering wrote:
> > I am totally not convinced this would be a good idea. You cannot fix
> > this anyway... Think about udevd: if you start it without /usr is
> > around, then it won't find the rules files below /usr. So by your logic
> > you'd add a RequiresMountsFor=/usr to udev's service file. But that
> > would totally break things, as the backing device for /usr will not
> > become available without udev.
> The difference being that systemd units and udev rules goes to $(rootlibdir) by 
> default, but these goes to $(libdir) by default.
> Also, systemd units and udev rules might be required to mount local file 
> systems, these are not.
> > systemd currently doesn't totally fail if /usr is found to be empty when
> > it initializes, but it will set a "taint" flag, since that really is an
> > unsupported setup.
> I'm well aware that a separate /usr not mounted in the initrd is an 
> unsupported setup, but a separate /usr/local *is* supposed to work, and making 
> a separate /usr slightly less broken when it comes at virtually no extra cost 
> (on top of getting a separate /usr/local working) is imho a good thing.

I am tempted to say that stuff that runs in early-boot (i.e. before
basic.target) cannot be split off into external partitions. And the ones
you list in your patch are all things that run in early boot...

(Also tmpfiles is ordered after local-fs.target anyway, so it is
actually ordered after /usr/local anyway, indirectly)

(And /usr/share/zoneinfo is something that is never Ok to split off. We
are not playing games of trying to come up with more exciting schemes
how people split up /usr. Really, /usr should be one thing, and maybe
/usr/local split off, but then it shouldn't expect to install anything
into early boot really...)      


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list