Re: The first and the last things in systemd's lifecycle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, May 14, 2019 at 10:24 AM Ulrich Windl <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx> wrote:
>>> Andrei Borzenkov <arvidjaar@xxxxxxxxx> schrieb am 14.05.2019 um 08:40 in
Nachricht
<CAA91j0VyN+972Q+D8b5YO1s04JM0BuxcHz_HN8fq9=-H616rXQ@xxxxxxxxxxxxxx>:
> On Tue, May 14, 2019 at 9:35 AM Ulrich Windl
> <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>>
>> I knew that. It doesn't answer _why_ /var/run is obsolete.
>>
>
> /var/run needs /var which is not guaranteed to be there when you need
> it which complicates things.

Thanks,

I'll start a new thread on this (I wanted to ask anyway):
AFAIK systemd does socket communication a lot, while old init was happy with just a root filesystem.
So I wonder how this Hen-Egg_Problem is solved: Systemd needs a socket to operate, but to provide the infrastructure, systemd would need the socket do do so.
Or expressed in other words: How can systemd create /run when it needs /run to operate?

1. systemd performs these actions during initialization, before switching to the main loop.
2. systemd can operate without any sockets; it connects to D-Bus for control once it becomes available, but it's not a runtime requirement.
 
The corresponding question would be for shutdown: How will systemd unmount /run? OK, if ist a ramdisk, it's not really needed.

The 'systemd-shutdown' binary doesn't unmount /run or /, it keeps the former and remounts the latter read-only.

(It can optionally pivot_root *to* /run, though, and unmount / using the "shutdown initramfs" feature.)
 

Another related question is that of shutdown in general:
For startup the semantics of Before= and After= are clear, but isn't it just reverted for shutdown? That is if "M" has "After=X" and "Before=Y", does that imply that Y is stopped before M will be stzopped, and M will be stopped before X is?

Yes, it is reversed on shutdown.
 

>From the experience how fast shutdown happens, I don't think it's like that.

Usually killing processes is faster than loading them from disk.

--
Mantas Mikulėnas
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux