[systemd-devel] [RFC] Network files system mounts should not (always) hold up boot.
Colin Guthrie
colin at mageia.org
Mon Apr 2 03:31:08 PDT 2012
Hi,
I discussed this with Lennart the other day, but here is a followup
patch.
In our discussions, I was concerned that remote-fs.target was a
pre-requisite of systemd-user-sessions.service as on my machine, my
/mnt/scratch NFS mount delayed the display manager startup when it has
absolutely nothing to do with logins.
Lennart suggested adding the "nofail" option to the fstab entry to ensure
that it did not actually hold up remote-fs.target, but sadly this did not
work. As remote-fs.target has to start after remote-fs-pre.target and,
in turn, remote-fs-pre.target waited for the network to be ready, it meant
that systemd-user-sessions.service was delayed until after the network was
ready, and thus prefdm.service was also delayed.
To get around this I added a new special target remote-fs-login.target.
The heuristic used here is that any network mounts with nofail were not
added as a dep to this new target but ones without it were.
systemd-user-sessions.service was then updated to depend on this new target
rather than plain old remote-fs.target.
So with this (relatively) small change, I obtained the behaviour Lennart
suggested. This approach seems to work well here and does what it is
supposed to.
I hope you can consider this for upstream inclusion.
Cheers
Col
More information about the systemd-devel
mailing list