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

Lennart Poettering lennart at poettering.net
Tue Jul 22 04:01:24 PDT 2014


On Tue, 22.07.14 00:39, Jon Severinsson (jon at severinsson.net) wrote:

> Unless both /usr and /usr/local is mounted in the initrd these
> services might miss some of their configuration otherwise.

Hmm? 

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. 

We don't really support booting up systemd without /usr mounted. If
people split that out then that's totally OK, but they *have* to mount
it from the initrd already, before transitioning into the host
OS. initrds such as dracut will actually do that.

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.

If you really want to make this work, the better idea is probably to
move *all* your distributions's udev rules files, modules-load files,
sysctl files, sysuers files out of /usr and into /.

But again, I think this is really misguided. Please work on your initrd
instead to make make sure it can pre-mount /usr before the
transition. Trying to fix this within systemd is the wrong solution.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list