[systemd-devel] Questions about systemd's "root storage daemon" concept

Martin Wilck mwilck at suse.com
Thu Jan 28 09:08:51 UTC 2021


Hi Lennart,

thanks again.

On Wed, 2021-01-27 at 23:56 +0100, Lennart Poettering wrote:
> On Mi, 27.01.21 21:51, Martin Wilck (mwilck at suse.com) wrote:
> 
> if you want the initrd environment to fully continue to exist,

I don't. I just need /sys and /dev (and perhaps /proc and /run, too) to
remain accessible. I believe most root storage daemons will need this.

> consider creating a new mount namespace, bind mount the initrd root
> into it recursively to some new dir you created. Then afterwards mark
> that mount MS_PRIVATE. then pivot_root()+chroot()+chdir() into your
> new old world.

And on exit, I'd need to tear all that down again, right? I don't want
my daemon to block shutdown because some file systems haven't been
cleanly unmounted.

Regards,
Martin




More information about the systemd-devel mailing list