Re: [systemd-devel] [PATCH 2/2] units: add RequiresMountsFor=/usr/… to various systemd service files
On Tue, 22.07.14 14:45, Jon Severinsson (j...@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 -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH 2/2] units: add RequiresMountsFor=/usr/… to various systemd service files
On Tue, 22.07.14 00:39, Jon Severinsson (j...@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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH 2/2] units: add RequiresMountsFor=/usr/… to various systemd service files
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. / Jon ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH 2/2] units: add RequiresMountsFor=/usr/… to various systemd service files
Unless both /usr and /usr/local is mounted in the initrd these services might miss some of their configuration otherwise. --- units/systemd-binfmt.service.in | 1 + units/systemd-modules-load.service.in | 1 + units/systemd-sysctl.service.in | 1 + units/systemd-sysusers.service.in | 1 + units/systemd-timedated.service.in | 1 + units/systemd-tmpfiles-setup.service.in | 1 + 6 files changed, 6 insertions(+) diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in index 02dfe77..a8fe42e 100644 --- a/units/systemd-binfmt.service.in +++ b/units/systemd-binfmt.service.in @@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5) Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt DefaultDependencies=no Conflicts=shutdown.target +RequiresMountsFor=/usr/lib/binfmt.d /usr/local/lib/binfmt.d After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount Before=sysinit.target shutdown.target ConditionPathIsReadWrite=/proc/sys/ diff --git a/units/systemd-modules-load.service.in b/units/systemd-modules-load.service.in index 32deb52..0619037 100644 --- a/units/systemd-modules-load.service.in +++ b/units/systemd-modules-load.service.in @@ -10,6 +10,7 @@ Description=Load Kernel Modules Documentation=man:systemd-modules-load.service(8) man:modules-load.d(5) DefaultDependencies=no Conflicts=shutdown.target +RequiresMountsFor=/usr/lib/modules-load.d /usr/local/lib/modules-load.d After=systemd-readahead-collect.service systemd-readahead-replay.service Before=sysinit.target shutdown.target ConditionCapability=CAP_SYS_MODULE diff --git a/units/systemd-sysctl.service.in b/units/systemd-sysctl.service.in index ade9dc3..a40bd12 100644 --- a/units/systemd-sysctl.service.in +++ b/units/systemd-sysctl.service.in @@ -10,6 +10,7 @@ Description=Apply Kernel Variables Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5) DefaultDependencies=no Conflicts=shutdown.target +RequiresMountsFor=/usr/lib/sysctl.d /usr/local/lib/sysctl.d After=systemd-readahead-collect.service systemd-readahead-replay.service After=systemd-modules-load.service Before=sysinit.target shutdown.target diff --git a/units/systemd-sysusers.service.in b/units/systemd-sysusers.service.in index 69fea11..d7fb678 100644 --- a/units/systemd-sysusers.service.in +++ b/units/systemd-sysusers.service.in @@ -10,6 +10,7 @@ Description=Create System Users Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8) DefaultDependencies=no Conflicts=shutdown.target +RequiresMountsFor=/usr/lib/sysusers.d /usr/local/lib/sysusers.d After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service Before=sysinit.target shutdown.target systemd-update-done.service ConditionNeedsUpdate=/etc diff --git a/units/systemd-timedated.service.in b/units/systemd-timedated.service.in index fe5ccb4..6385738 100644 --- a/units/systemd-timedated.service.in +++ b/units/systemd-timedated.service.in @@ -9,6 +9,7 @@ Description=Time Date Service Documentation=man:systemd-timedated.service(8) man:localtime(5) Documentation=http://www.freedesktop.org/wiki/Software/systemd/timedated +RequiresMountsFor=/usr/share/zoneinfo [Service] ExecStart=@rootlibexecdir@/systemd-timedated diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in index 72ab083..b968e83 100644 --- a/units/systemd-tmpfiles-setup.service.in +++ b/units/systemd-tmpfiles-setup.service.in @@ -10,6 +10,7 @@ Description=Create Volatile Files and Directories Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) DefaultDependencies=no Conflicts=shutdown.target +RequiresMountsFor=/usr/lib/tmpfiles.d /usr/local/lib/tmpfiles.d After=systemd-readahead-collect.service systemd-readahead-replay.service local-fs.target systemd-sysusers.service Before=sysinit.target shutdown.target RefuseManualStop=yes -- 2.0.1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel