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

2021-01-28 Thread Lennart Poettering
On Do, 28.01.21 10:08, Martin Wilck (mwi...@suse.com) wrote: > 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 (mwi...@suse.com) wrote: > > > > if you want the initrd environment to fully continue to exist, > >

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

2021-01-28 Thread Martin Wilck
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 (mwi...@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

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

2021-01-27 Thread Martin Wilck
On Tue, 2021-01-26 at 11:33 +0100, Lennart Poettering wrote: > > > > > [Unit] > > Description=NVMe Event Monitor for Automatical Subsystem Connection > > Documentation=man:nvme-monitor(1) > > DefaultDependencies=false > > Conflicts=shutdown.target > > Requires=systemd-udevd-kernel.socket > > Afte

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

2021-01-27 Thread Lennart Poettering
On Mi, 27.01.21 21:51, Martin Wilck (mwi...@suse.com) wrote: > Meanwhile I've looked a bit deeper into the problems accessing "/dev" > that I talked about in my other post. scandir on "/" actually returns > an empty directory after switching root, and any path lookups for > absolute paths fail. I

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

2021-01-26 Thread Martin Wilck
On Tue, 2021-01-26 at 11:30 +0100, Lennart Poettering wrote: > > > Imagine two parallel instances of systemd-udevd (IMO there are > > reasons > > to handle it like a "root storage daemon" in some distant future). > > Hmm, wa? naahh.. udev is about dicovery it should not be required to > maintain

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

2021-01-26 Thread Lennart Poettering
On Di, 26.01.21 13:30, Martin Wilck (mwi...@suse.com) wrote: > On Tue, 2021-01-26 at 11:30 +0100, Lennart Poettering wrote: > > > > > Imagine two parallel instances of systemd-udevd (IMO there are > > > reasons > > > to handle it like a "root storage daemon" in some distant future). > > > > Hmm, w

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

2021-01-26 Thread Lennart Poettering
On Di, 26.01.21 01:19, Martin Wilck (mwi...@suse.com) wrote: > On Mon, 2021-01-25 at 18:33 +0100, Lennart Poettering wrote: > > > > Consider using IgnoreOnIsolate=. > > > > I fail to make this work. Installed this to the initrd (note the > ExecStop "command"): > > [Unit] > Description=NVMe Even

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

2021-01-26 Thread Lennart Poettering
On Mo, 25.01.21 19:04, Martin Wilck (mwi...@suse.com) wrote: > Is there any way for the daemon to get notified if root is switched? /proc/self/mountinfo sends out notification events via inotify when mounts are established/removed. I am pretty sure pivot_root() also generates that. Your daemon co

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

2021-01-25 Thread Martin Wilck
On Mon, 2021-01-25 at 18:33 +0100, Lennart Poettering wrote: > > Consider using IgnoreOnIsolate=. > I fail to make this work. Installed this to the initrd (note the ExecStop "command"): [Unit] Description=NVMe Event Monitor for Automatical Subsystem Connection Documentation=man:nvme-monitor(1)

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

2021-01-25 Thread Martin Wilck
On Mon, 2021-01-25 at 18:33 +0100, Lennart Poettering wrote: > On Sa, 23.01.21 02:44, Martin Wilck (mwi...@suse.com) wrote: > > > Hi > > > > I'm experimenting with systemd's root storage daemon concept > > (https://systemd.io/ROOT_STORAGE_DAEMONS/). > > > > I'm starting my daemon from a service

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

2021-01-25 Thread Lennart Poettering
On Sa, 23.01.21 02:44, Martin Wilck (mwi...@suse.com) wrote: > Hi > > I'm experimenting with systemd's root storage daemon concept > (https://systemd.io/ROOT_STORAGE_DAEMONS/). > > I'm starting my daemon from a service unit in the initrd, and > I set argv[0][0] to '@', as suggested in the text. >

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

2021-01-22 Thread Martin Wilck
Hi I'm experimenting with systemd's root storage daemon concept (https://systemd.io/ROOT_STORAGE_DAEMONS/). I'm starting my daemon from a service unit in the initrd, and I set argv[0][0] to '@', as suggested in the text. So far so good, the daemon isn't killed.  But a lot more is necessary to m