Please don't use "soft" NFS mounts unless they are read-only.
Also, I don't see the "bg" option in the mount.nfs manpage. Is that valid?
poko21, would be helpful if you actually showed a systemd-mount
Unit file, if that is what you are proposing. I've never seen those used in the wild.
Also, what is "<your_fstab_entry>" - that can be confusing.
The showmount -e {ip-of-NFS-server} command will show which mounts the client can access. But since the OP already said a manual mount command worked, it wasn't useful for THIS thread.
My auto.nfs from a client has entries like this:
Code:
-fstype=nfs,nconnect=4,proto=tcp,rw,async istar:/d/D1
istar is in my DNS, so I don't need to use the IP address, but that would be fine too.
The resulting mount looks like this:
Code:
$ dft /d/D1
Filesystem Type Size Used Avail Use% Mounted on
istar:/d/D1 nfs4 3.5T 3.5T 2.5G 100% /d/D1
Another view of the mount results:
Code:
$ mount |grep /d/D1
/etc/auto.nfs on /d/D1 type autofs (rw,relatime,fd=6,pgrp=1486,timeout=300,minproto=5,maxproto=5,direct,pipe_ino=24915)
istar:/d/D1 on /d/D1 type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,nconnect=4,timeo=600,retrans=2,sec=sys,clientaddr=172.22.22.5,local_lock=none,addr=172.22.22.20)
Converting the autofs entry into an fstab line would look like this:
Code:
istar:/d/D1 /d/D1 nfs nconnect=4,proto=tcp,rw,async 0 0
I don't actually need "proto=tcp,rw" options. Those are defaults these days. the others aid with performance for my specific NFS server, storage, and network. You can also see from the df and mount output that nfs v4.2 and a hard mount, rsize, wsise, without file locking is negotiated automatically. I'm not using NFS v4 w/ Kerberos tickets. That would be more secure, but it is more hassle to setup. In a business where clients and servers aren't on the same small, server-only, subnet, I'd demand Kerberos be used.