nfs does not mount at boot with bridge
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I am running a Ubuntu 20.04 server with lxd and kvm/qemu.
I try to connect a nfs share at boot. It is working while I do not configure any bridge with netplan. I am creating directly a systemd service for the NFS mount but I have the same problem if I edit the fstab file.
#/etc/systemd/
[Unit]
Description=NAS devices
After=network.
[Mount]
What=192.
Where=/mnt/nas
Type=nfs
Options=
[Install]
WantedBy=
## TEST WITHOUT BRIDGE
#/etc/netplan/
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: yes
root@bowser:~# ip a
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,
link/ether f8:75:a4:00:be:ad brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global dynamic eno1
valid_lft 86244sec preferred_lft 86244sec
inet6 fe80::fa75:
valid_lft forever preferred_lft forever
3: wlp1s0: <BROADCAST,
link/ether 60:f2:62:38:d7:c2 brd ff:ff:ff:ff:ff:ff
root@bowser:~# journalctl -b
...
May 04 08:58:08 bowser systemd-
May 04 08:58:08 bowser kernel: e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
May 04 08:58:08 bowser kernel: IPv6: ADDRCONF(
May 04 08:58:08 bowser systemd[1]: systemd-
May 04 08:58:08 bowser set-cpufreq[795]: Setting powersave scheduler for all CPUs
May 04 08:58:08 bowser systemd[1]: ondemand.service: Succeeded.
May 04 08:58:08 bowser systemd[1]: dmesg.service: Succeeded.
May 04 08:58:09 bowser systemd-
May 04 08:58:09 bowser systemd-
May 04 08:58:10 bowser systemd-
May 04 08:58:10 bowser systemd-
May 04 08:58:10 bowser systemd-
May 04 08:58:10 bowser systemd-
May 04 08:58:10 bowser systemd-
May 04 08:58:10 bowser systemd[1]: Finished Wait for Network to be Configured.
May 04 08:58:10 bowser systemd[1]: Reached target Network is Online.
May 04 08:58:10 bowser systemd[1]: Condition check resulted in Login to default iSCSI targets being skipped.
May 04 08:58:10 bowser systemd[1]: Reached target Remote File Systems (Pre).
May 04 08:58:10 bowser systemd[1]: Mounting NAS devices...
May 04 08:58:10 bowser systemd[1]: Starting Availability of block devices...
May 04 08:58:10 bowser systemd[1]: Condition check resulted in Pollinate to seed the pseudo random number generator being skipped.
May 04 08:58:10 bowser systemd[1]: Starting OpenBSD Secure Shell server...
May 04 08:58:10 bowser systemd[1]: Finished Availability of block devices.
May 04 08:58:10 bowser kernel: FS-Cache: Loaded
May 04 08:58:10 bowser sshd[952]: Server listening on 0.0.0.0 port 22.
May 04 08:58:10 bowser sshd[952]: Server listening on :: port 22.
May 04 08:58:10 bowser systemd[1]: Started OpenBSD Secure Shell server.
May 04 08:58:10 bowser kernel: FS-Cache: Netfs 'nfs' registered for caching
May 04 08:58:10 bowser kernel: NFS: Registering the id_resolver key type
May 04 08:58:10 bowser kernel: Key type id_resolver registered
May 04 08:58:10 bowser kernel: Key type id_legacy registered
May 04 08:58:10 bowser systemd[1]: /lib/systemd/
May 04 08:58:10 bowser systemd[1]: Starting Preprocess NFS configuration...
May 04 08:58:10 bowser systemd[1]: nfs-config.service: Succeeded.
May 04 08:58:10 bowser systemd[1]: Finished Preprocess NFS configuration.
May 04 08:58:10 bowser systemd[1]: Starting Notify NFS peers of a restart...
May 04 08:58:10 bowser systemd[1]: Starting NFS status monitor for NFSv2/3 locking....
May 04 08:58:10 bowser sm-notify[962]: Version 1.3.3 starting
May 04 08:58:10 bowser systemd[1]: rpc-statd-
May 04 08:58:10 bowser systemd[1]: Started Notify NFS peers of a restart.
May 04 08:58:10 bowser rpc.statd[964]: Version 1.3.3 starting
May 04 08:58:10 bowser rpc.statd[964]: Flags: TI-RPC
May 04 08:58:10 bowser systemd[1]: Started NFS status monitor for NFSv2/3 locking..
May 04 08:58:10 bowser systemd[1]: Mounted NAS devices.
...
## TEST WITH BRIDGE
#/etc/netplan/
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
bridges:
br0:
macaddress: f8:75:a4:00:be:ad
dhcp4: yes
interfaces: [eno1]
root@bowser:~# ip a
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,
link/ether f8:75:a4:00:be:ad brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,
link/ether f8:75:a4:00:be:ad brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global dynamic br0
valid_lft 85658sec preferred_lft 85658sec
inet6 fe80::fa75:
valid_lft forever preferred_lft forever
4: wlp1s0: <BROADCAST,
link/ether 60:f2:62:38:d7:c2 brd ff:ff:ff:ff:ff:ff
root@bowser:~# journalctl -b
...
May 04 07:40:14 bowser systemd-
May 04 07:40:14 bowser systemd-
May 04 07:40:14 bowser kernel: e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
May 04 07:40:14 bowser kernel: IPv6: ADDRCONF(
May 04 07:40:14 bowser kernel: br0: port 1(eno1) entered blocking state
May 04 07:40:14 bowser kernel: br0: port 1(eno1) entered forwarding state
May 04 07:40:14 bowser kernel: IPv6: ADDRCONF(
May 04 07:40:14 bowser systemd-
May 04 07:40:14 bowser systemd-
May 04 07:40:14 bowser systemd[1]: Finished Wait for Network to be Configured.
May 04 07:40:14 bowser systemd[1]: Reached target Network is Online.
May 04 07:40:14 bowser systemd[1]: Condition check resulted in Login to default iSCSI targets being skipped.
May 04 07:40:14 bowser systemd[1]: Reached target Remote File Systems (Pre).
May 04 07:40:14 bowser systemd[1]: Mounting NAS devices...
May 04 07:40:14 bowser systemd[1]: Starting Availability of block devices...
May 04 07:40:14 bowser systemd[1]: Condition check resulted in Pollinate to seed the pseudo random number generator being skipped.
May 04 07:40:14 bowser systemd[1]: Starting OpenBSD Secure Shell server...
May 04 07:40:14 bowser systemd[1]: Finished Availability of block devices.
May 04 07:40:14 bowser kernel: FS-Cache: Loaded
May 04 07:40:14 bowser sshd[934]: Server listening on 0.0.0.0 port 22.
May 04 07:40:14 bowser sshd[934]: Server listening on :: port 22.
May 04 07:40:14 bowser systemd[1]: Started OpenBSD Secure Shell server.
May 04 07:40:14 bowser kernel: FS-Cache: Netfs 'nfs' registered for caching
May 04 07:40:14 bowser kernel: NFS: Registering the id_resolver key type
May 04 07:40:14 bowser kernel: Key type id_resolver registered
May 04 07:40:14 bowser kernel: Key type id_legacy registered
May 04 07:40:14 bowser mount[930]: mount.nfs: Network is unreachable
May 04 07:40:14 bowser systemd[1]: mnt-nas.mount: Mount process exited, code=exited, status=32/n/a
May 04 07:40:14 bowser systemd[1]: mnt-nas.mount: Failed with result 'exit-code'.
May 04 07:40:14 bowser systemd[1]: Failed to mount NAS devices.
May 04 07:40:14 bowser systemd[1]: Reached target Remote File Systems.
...
> After=network. target
You want network- online. target, not network.target.