So, weird stuff. I have an RPI2b installed 20.04-32 early May, NFS mount works flawlessly on boot.
Now I got an RPI4b and tried 20.04-64/32 and the same NFS mount gloriously fails on boot.
I’ve got a Synology NAS and can mount the share just fine after boot with
sudo mount -a
I got my entry in fstab and it fails. It seems the network is not available when systemd tries to mount on boot.
I tried it with
_netdevs, x-systemd.after=network-online.target to no avail.
The fstab entry is directly to the local IP address, so no resolving and no external network involved.
So I went to just Pi-Image a clean 20.04-32 and started from the top.
Updated apt, upgraded, installed nfs-common, tried to manually mount and it worked. Added the same entry to fstab as on the RPI2b, automount from the shell worked, rebooted and it fails again.
So I dug into the syslog and systemctl.
cat /var/log/syslog | grep -C 5 "remote-fs.target" May 30 20:34:55 ubuntu mount: mount.nfs: Network is unreachable May 30 20:34:55 ubuntu systemd: media-nas-emulation.mount: Mount process exited, code=exited, status=32/n/a May 30 20:34:55 ubuntu systemd: media-nas-emulation.mount: Failed with result 'exit-code'. May 30 20:34:55 ubuntu systemd: Failed to mount /media/nas/emulation. May 30 20:34:55 ubuntu systemd: Dependency failed for Remote File Systems. May 30 20:34:55 ubuntu systemd: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'. ...
So by the looks of it, remote-fs.target failed. It should be called at some point during boot but isn’t.
Right after boot:
[email protected]:~$ sudo systemctl | grep remote-fs remote-fs-pre.target loaded active active Remote File Systems (Pre)
So I do a manual start and check again
[email protected]:~$ sudo systemctl start remote-fs.target [email protected]:~$ sudo systemctl | grep remote-fs remote-fs-pre.target loaded active active Remote File Systems (Pre) remote-fs.target loaded active active Remote File Systems
So manually starting the target works, and the NFS mount is available automatically right afterwards.
So it seems something’s really wrong and remote-fs.target never is called, even after the network is up.
On the RPi2b with 20.04 32b the NFS just mounts during boot with systemd reporting success.
Does anyone have any idea what’s wrong and/or how to fix it?