nfs no longer mounted at boot with systemd
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| systemd (Ubuntu) |
High
|
Martin Pitt | |||
Bug Description
I updated my vivid laptop today, and now boot with systemd by default.
Unfortunately, my nfs mount no longer mounts at boot.
From syslog:
Mar 9 14:38:20 mdlinux mount[866]: mount.nfs: Network is unreachable
Mar 9 14:38:20 mdlinux systemd[1]: mnt-server.mount mount process exited, code=exited status=32
Mar 9 14:38:20 mdlinux systemd[1]: Failed to mount /mnt/server.
Mar 9 14:38:20 mdlinux systemd[1]: Dependency failed for Remote File Systems.
Mar 9 14:38:20 mdlinux systemd[1]: Job remote-
Mar 9 14:38:20 mdlinux systemd[1]: Unit mnt-server.mount entered failed state.
This is happening before my network interfaces are ready:
Mar 9 14:38:21 mdlinux NetworkManager[
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: nfs-common 1:1.2.8-9ubuntu6
ProcVersionSign
Uname: Linux 3.19.0-7-generic x86_64
ApportVersion: 2.16.2-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Mar 9 14:45:48 2015
InstallationDate: Installed on 2013-11-26 (467 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
SourcePackage: nfs-utils
UpgradeStatus: Upgraded to vivid on 2015-03-07 (2 days ago)
| Marc Deslauriers (mdeslaur) wrote : | #1 |
| Steve Langasek (vorlon) wrote : | #2 |
| affects: | nfs-utils (Ubuntu) → systemd (Ubuntu) |
| Changed in systemd (Ubuntu): | |
| assignee: | nobody → Martin Pitt (pitti) |
| Martin Pitt (pitti) wrote : | #3 |
Indeed, these should have a Wants=/
| tags: | added: systemd-boot |
| Changed in systemd (Ubuntu): | |
| importance: | Undecided → High |
| status: | New → In Progress |
| Martin Pitt (pitti) wrote : | #4 |
Asked on upstream ML: http://
In the meantime, you could edit /lib/systemd/
Wants=network-
After=network-
This should fix the boot, at least if you use ifupdown (which I assume if you use NFS). With network-manager it won't work yet as we haven't enabled NetworkManager-
| Marc Deslauriers (mdeslaur) wrote : | #5 |
I have always used network-manager, so I'll wait.
| Marc Deslauriers (mdeslaur) wrote : | #6 |
In case this is helpful:
$ cat /run/systemd/
# Automatically generated by systemd-
[Unit]
SourcePath=
Documentation=
Before=
[Mount]
What=192.
Where=/mnt/server
Type=nfs
Options=
$ grep nfs /etc/fstab
192.x.x.
| Martin Pitt (pitti) wrote : | #7 |
Discussion on the ML confirmed that these *do* wait (implicitly) on network-
Wants=network-
After=remote-
So this is merely a duplicate of bug 1430280.


I've seen this as well on my desktop. For me it was not a regression vs. upstart (there are bug reports about nfs mounts similarly not being mounted at boot under upstart in Ubuntu 14.10 and later), which is why I did not consider this a blocker for switching by default.
Looking at the systemd mount generator output on my system, I see entries such as: generator/ srv.mount fstab-generator
$ cat /run/systemd/
# Automatically generated by systemd-
[Unit] /etc/fstab man:fstab( 5) man:systemd- fstab-generator (8) remote- fs.target
SourcePath=
Documentation=
Before=
[Mount] soft,intr, async,nolock, sec=krb5i, proto=tcp
What=<server>:/
Where=/srv
Type=nfs4
Options=
$
This is notably lacking any dependency information requiring the network to be up before trying (and failing) to start the unit.
Reassigning to systemd.