[systemd-devel] [PATCH 6/7] mount: filesystems mounted in the initrd should not conflict with umount.target in the real root
Lennart Poettering
lennart at poettering.net
Wed Sep 11 17:22:26 PDT 2013
On Wed, 11.09.13 19:48, Colin Walters (walters at verbum.org) wrote:
>
> On Wed, 2013-09-11 at 19:11 +0200, Lennart Poettering wrote:
>
> > Can you elaborate on this? Why wouldn't it suffice to drop in a .mount
> > unit for the mount in question which excludes the mount point from being
> > unmounted with this?
>
> It doesn't appear possible to remove the default Conflicts= just by
> creating /etc/systemd/system/var.mount.
You'd have to set DefaultDependencies=no in order to turn the implicit
shutdown.target conflict dep off.
> I tried doing my plan of adding a boolean to mount units if we detect
> them at coldplug time, and ensuring we pass that from the dracut systemd
> to the deserialized main pid. But what I hit doing that was from
> dracut-systemd's perspective it is /sysroot/var, and not /var. Would
> need to do some sort of device/inode pairing to fix up paths after a
> potential switch-root.
Still not convinced that we really want to do that. But note that on
Linux mounts have a fixed numeric ID, which is the first column in
/proc/self/mountinfo. You can also query that ID on many (but not all)
file systems via the name_to_handle_at() system call (which is really
nasty to use though, we already use it in path-util.c and tmpfiles.c
already.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list