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

Kai Krakow hurikhan77 at gmail.com
Sat Oct 15 03:10:50 UTC 2016


Am Fri, 14 Oct 2016 19:58:13 +0300
schrieb Andrei Borzenkov <arvidjaar at gmail.com>:

> 14.10.2016 12:11, Juergen Sauer пишет:
> > 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?!? 
> 
> local mounts are by default ordered before remote mounts, so you have
> dependency loop. Systemd resolves it by deleting one of units in this
> loop. Depending on what unit gets deleted you get different results. I
> do not know how deterministic algorithm is.

I'd create something like /home/local/leander which contains your local
directories. This also requires only one subvolume mount for exactly
this one directory. Then put symlinks into your /home/leander to the
local directories.

Since local mounts are strictly ordered before remote mounts, you can
be sure than the local directories are available when your nfs home dir
is mounted.

> > The BUG is:
> > The btrfs subvols are i.g. mounted - disobeying the
> > x-systemd.requires=home.mount rule.
> >   
> 
> Yes, systemdm will create mount point if it does not exist. I am still
> unsure whether this is a good thing.
> 
> ...
> 
> > 
> > 192.168.11.10:/home        /home   nfs
> > nofail,x-systemd.device-timeout=1,x-systemd.requires=network-online.target
> >     0 0
> >   
> 
> systemd already adds dependency on network-online.target to network
> mounts. But do not forget that you need something that actually
> implements waiting for network, otherwise this requirement is
> effectively noop.
> 
> > LABEL=pc11root /home/leander/.cache       btrfs
> > ssd,ssd_spread,discard,compress=lzo,noatime,subvol=user/leander/cache,x-systemd.requires=home.mount
> > 0 0  
> 
> systemd adds equivalent to RequiresMountsFor=mount-point so
> x-systemd.requires here is redundant.
> ...
> 
> > 
> > 
> > How to fix?
> >  
> 
> Try adding _netdev to each mount that depends on /home to order them
> after network.


-- 
Regards,
Kai

Replies to list-only preferred.




More information about the systemd-devel mailing list