Bug#756903: systemd: Boot hangs if filesystems unavailable

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Aug 22 17:49:07 BST 2014


On Fri, Aug 22, 2014 at 10:30:47AM -0400, Stefan Monnier wrote:
> >> - 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.
> Not sure what "that" means here.  Does your "that" mean "that which you
> just described" or does it mean "fail"?
Treat all mounts as "critical".

> > Systemd tries to do the corrent and safe thing by default.
> 
> I'd hope so, but here's my case:
> - a machine somewhat far away with an old and unimportant fstab entry
>   that refers to a drive that's rarely connected.
> - after upgrading to systemd, the fstab entry caused systemd to stop the
>   boot (presumably asking for the operator to do something on console).
> - with the boot stopped, I (the operator who is not on console, since
>   it's a remote machine), I can't fix the fstab entry.
> 
> In which way is it "safe and correct" to interrupt the boot in this case?
In the way that missing some mounts may indicate a serious problem and
could lead to incorrect behaviour or data loss.

> I can understand that making the mount wait (rather than just fail
> right away) might be made necessary by the fact that systemd changes the
> order in which operations are performed.  I.e. I understand why the
> change nb 1 might be needed.
> 
> But that doesn't explain why change number 2 was needed.
> Apparently you think Michael's response explains it, but I failed to
> see how.
Michael's response explains why it is not possible for systemd to
distinguish which filesystems are "critical", and which are
not. Sysvinit documentation is not particularly verbose about what happens
on error. mount(8) describes 'nofail', which implies that the opposite it
the default. I agree that stopping the boot is a change in semantics
to some degree, but this kind of change parallels changes to other
parts of the boot done by systemd, where status of things (services,
swap points, configuration settings) is checked and the boot is
stopped when something important fails. You can configure things
otherwise, but the default is to strictly obey dependencies.

Zbyszek




More information about the Pkg-systemd-maintainers mailing list