[systemd-devel] [HEADS-UP] systemd and Storage Daemons for the Root File System

Jan Engelhardt jengelh at medozas.de
Wed Jan 11 08:11:44 PST 2012


On Wednesday 2012-01-11 16:39, Kay Sievers wrote:

>On Wed, Jan 11, 2012 at 16:04, Jan Engelhardt <jengelh at medozas.de> wrote:
>
>> Therefore you can detect which programs where started inside the rootfs
>> vfsmount. That information can then influence killing decisions as
>> needed.
>>
>> Now, Kay Sievers claims (on IRC) pivot_root is "10 years ago stuff" and
>> points to util-linux's switchroot function for how things are supposedly
>> to be done today. But, as we look at
>> http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=blob;f=sys-utils/switch_root.c;hb=HEAD#l150
>> what can really be seen there is that the new root (/dev/sda3 in my
>> previous commands example) is just mounted atop the rootfs-type
>> vfsmount, thereby concealing it.
>> (That is not a replacement for what pivot_root does, really.)
>
>As far as I understand, the kernels own initial namespace [sic], the
>initramfs where the cpio image is extracted to at bootup or the root=
>device is mounted to by the kernel, can not be replaced by
>pivot_root(), then same way it can not be umounted.

That seems to be the case - well, it should not be too hard actually 
mounting a dummy ramfs/tmpfs on top of the rootfs vfsmount before 
starting any storage daemon(s). That one can then be pivoted as planned.


More information about the systemd-devel mailing list