[systemd-devel] Stateless system - Centos8 and overlayfs on root

Preston L. Bannister preston at bannister.us
Tue Mar 31 16:19:08 UTC 2020


On Tue, Mar 31, 2020 at 1:10 AM Lennart Poettering <mzxreary at 0pointer.de>
wrote:

> On Fr, 27.03.20 10:17, Preston L. Bannister (preston at bannister.us) wrote:
>
> > Had the (possibly) clever notion of using an overlayfs as the root mount,
> > with a tmpfs as the upper, and the usual persistent volume as the
> > lower.
>
> Current systemd versions support this natively, just boot with
> "systemd.volatile=overlay" on the kernel cmdline. Doubt this is in
> centos8 yet, though.
>

I can confirm that adding "systemd.volatile=yes" on the kernel cmdline with
Centos 8 results in failed boot. Some obscure error related to initramfs
that I have not tried to typify. Also Centos 8 has systemd 232, and it
looks like "systemd.volatile=overlay" handed later in systemd.


Note that overlayfs is a weird fs, it has strange, non-posixy
> semantics (inode nrs a fucked). It generally doesn't work as well as
> people want it to work, and while you might get away with using it for
> small, well-defined scenarios it's not suitable for complex, general
> purpose systems to run as root fs.
>
> "systemd.volatile=overlay" is a nice tool for testing and development,
> and maybe some very specific setups, but it's not really something i'd
> want to deploy in production in big scale.
>

OK - had not hear that before. Thanks. Did see some odd behavior, but
assumed (and still) the fault was mine.



> Look what src/volatile-root/volatile-root.c in current systemd
> versions is doing. It's relatively straight-forward. You can do
> something similar with a shell script.
>

Looking.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200331/c8b14f89/attachment.htm>


More information about the systemd-devel mailing list