[systemd-devel] BUG: Huge Problem: systemd does not mount all filesystems on Boot

Lennart Poettering lennart at poettering.net
Wed Oct 19 20:44:12 UTC 2016


On Fri, 14.10.16 11:11, Juergen Sauer (juergen.sauer at automatix.de) wrote:

> Moin,
> 
> Systemd 231, Archlinux current
> 
> The concept is /home is to be mounted from nfs server. Works.
> For performance reasons (email thunderbird, kde/plasma 5.8.x i.e odr
> gnome are unusable if home is pure nfs) the user sub dirs .local,
> .cache, .config, .thunderbird etc. are mounts from local fs (btrfs
> subvolume).
> 
> Network is without NetWorkmanager (masked), fixed configured via
> systemd-networkd.
> 
> The Problem is, after boot /home is mounted or not, random
> result. WTF?!?

As others already pointed out: mounting local device-based file
systems inside of remote network-based ones isn't particularly well
supported. We generally mount network-based mounts pretty late (since
NM and friends are late-boot services usually, and we need to be
compatible with that), but local file systems pretty early during
the earliest boot phases. If you now nest local file systems into
remote ones, then this creates a cyclic ordering dependency: the local
mounts are mounted first, the network mounts second, but want to be
mounted before the local mounts. Which of course can't be fulfilled
fully.

If systemd runs into a cyclic dep like this it's usually approach is
to remove jobs from the cyclce until the cycle is gone. Which one is
removed is not deterministic, and that's what you are seeing.

My general recommendation would be not to do such setups of nesting
local mounts within remote mounts. But if you really want to do that,
you should probably be able to mark your nested mounts as remote and
thus remove the ordering problem. Specifically, adding "_netdev" as
mount option to the relevant mounts should suffice.

Hope this makes sense,

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list