On Thu, Apr 28, 2016 at 10:13:52AM -0300, Felipe Sateler wrote:
> On 28 April 2016 at 09:26, Alkis Georgopoulos <alk...@gmail.com> wrote:
> Wouter wrote:
> > The reason nbd is in runlevel S is because it needs to run before
> > mountnfs.sh, otherwise filesystems won't be mounted properly.
> 
> What does this mean? Will nfs filesystems not be mounted, or
> nbd-backed filesystems not be mounted properly?

It means nbd-backed filesystems won't be mounted when not using systemd
and not using the proper dependency headers, because insserv places the
init script either too early (when there is no network) or too late
(when the mountnfs.sh init script has already tried and failed to mount
nbd-backed filesystems, which are marked with _netdev in fstab).

> > The init
> > script has a line "X-Start-Before: mountnfs" to enforce that. It could
> > work if either Ubuntu doesn't support non-systemd installs anymore, or
> > if mountnfs (or its systemd equivalent) has been moved out of S as well.
> 
> Systemd provides a symlink from mountnfs to /dev/null, thus it no
> longer exists. So this invariant is broken anyway. However, systemd
> mounts asynchronously as devices appear, so maybe the broken invariant
> is not problematic when running under systemd.

Possibly, but the dependency on $network is still required, and the
X-Start-Before line and (thus) the S runlevel specification is still
required for non-systemd installs, too.

If ubuntu no longer supports non-systemd installs (I don't know whether
that's the case), then given all the above, dropping the S runlevel and
removing the X-Start-Before header *should* work. However, the
dependency on $network must remain (otherwise the script will be started
before the server is accessible).

Ideally, the patches that are referred to in Debian #812485 and #812487
are applied to ubuntu's udev and kernel, although this is not crucial
(udev already manages to discover when an nbd device is connected, so
boot will work, it's just that discovery of disconnects is broken).

With these changes, booting the system *should* work (although I haven't
tested any of the above, so please do). Shutdown might be a different
matter.

Doing all this *will* break non-systemd installs, however. If that's
okay as a tradeoff, then you could do that.

Also, I don't know what the policy is on updates to a just-released LTS
Ubuntu, so maybe that's a blocker? If not, it's my hope to get a
properly working systemd boot by the end of debcamp at the latest, so
maybe you can fix it by updating to the then-current version of nbd in
Debian unstable if no issues are found in Debian after a while.

-- 
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
       people in the world who think they really understand all of its rules,
       and pretty much all of them are just lying to themselves too.
 -- #debian-devel, OFTC, 2016-02-12

Reply via email to