NFS mounts not happening at boot in 18.04 or 18.10
I'm trying to set up a couple of NFS mounts to automatically mount at boot. I'm not new to this; I did this on Solaris in 1985.
Here's what I have in /etc/fstab:
iomega:/nfs/Music /music nfs rw,auto,user 0 0It doesn't mount at boot and leaves this message in syslog:
Mount process exited, code=exited status=32It didn't work in 18.04, and I just upgraded today to 18.10 and it still doesn't work. If I do a mount -a after boot, that fs mounts normally.
I've tried several suggestions about adding systemd-specific parameters to the mount options, but none of them worked.
This is basic functionality. It should JFW. Can anybody tell me what the exit code 32 means and how to make this work?
22 Answers
Try changing the options in your /etc/fstab on that line to read like the following:
iomega:/nfs/Music /music nfs defaults,nofail 0 0I use NFS at home as well, and these options have never failed me.
I am not sure what the code 32 means, but this one backs up my answer:
Hope this helps!
2Try autofs. You can give it a try like what I did.
- Install NFS Client
apt -y install nfs-common- Configure auto-mounting
apt -y install autofs- Edit
auto.masterfile
vi /etc/auto.masterAdd /- /etc/auto.nfs at the bottom.
(You can give a different name rather than auto.nfs.)
- Write auto.nfs
vi /etc/auto.nfsWrite as /nfs/share -fstype=nfs4,rw server:remote-point.
In case your server uses nfs4.0 you would better to add an option like this./nfs/share -fstype=nfs4,rw -vers=4.0 server:remote-point
- Create a directory and run
mkdir /nfs/share
systemctl restart autofs- Check if it works
ls /nfs/shareref: Configure NFS Client