Bug#756903: systemd: Boot hangs if filesystems unavailable

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Aug 22 04:41:56 BST 2014


On Sat, Aug 09, 2014 at 04:36:50PM -0400, Stefan Monnier wrote:
> > Well, I consider the sysvinit behaviour buggy and unfortunately this
> > lead to broken fstab configurations in the past.
> 
> There are 2 changes here:
> 1- systemd seems to *wait* for the device to be available, whereas the
>    old scripts just failed right away if the device was absent.
> 2- if the mount fails, this is considered by default as a fatal error.
> 
> Which of those 2 was "buggy" in sysvinit?  The lack of wait or the fact
> that it moved on upon failure?
Both :)

It is not uncommon for systems on SSD to boot to graphical login in ~2s,
which simply is not enough for all hardware, especially USB, to be
reliably detected. Since systemd mounts disks somewhere in the first
second, waiting for devices to show up is simply unavoidable.

You snipped Michaels response for the other issue. There's no way to
guess which filesystems listen in fstab are "important", and which
can be skipped.

> I like the idea of mounting/fscking partitions without blocking other
> unrelated boot steps, so I'm OK with adding boot options to help systemd
> do a better job, but blocking the boot just because some random fstab
> entry has an error is really obnoxious (it took me a while to fix my
> machine after installing systemd-sysv because of such an fstab entry
> referring to a disk that was not connected.  Thank god there is
> "break=mount"!).
> 
> Here are my suggestions:
> - In the absence of an explicit request to "bootwait", systemd should
>   not wait for a device to appear, or at least not anywhere near 90s,
>   especially if it is holding back the whole rest of the boot process.
> - If a mount fails, keep on booting.  And then do your best to try and
>   bring this problem to the attention of someone (mentioning the
>   "nofail" option in that same message).  Only stop the boot if the
>   partition is explicitly marked as "critical" or "stoponfail".
Well, 'fail', which is the default, means just that. Systemd tries
to do the corrent and safe thing by default.

Zbyszek




More information about the Pkg-systemd-maintainers mailing list