I’ve followed it exactly (making /srv/nfs/ and bind mounts, /etc/exports is as specified - except I’ve used a single ip instead of a range)
I’ve got as far as
Manual mounting
For NFSv3 use this command to show the server’s exported file systems:
$ showmount -e servername
Instead of the exported share, I get rpc mount export: RPC: unable to receive; errno = Connection refused
It’s not listed in https://wiki.archlinux.org/title/NFS/Troubleshooting. A Google search gives issues such as Firewalls (I have no rules according to iptables -L), permissions (but /srv/nfs is drwxr-xr-x) and portmapper restrictions (but I have no portmapper).
No, I don’t think so. I’ve run iptables -L on both server and client and it reads (policy ACCEPT) for INPUT, FORWARD, and OUTPUT and no other policies. Running ufw status gives ‘inactive’.
I do have a setup here with one NFS server and several PCs that use one or more of the NFS shares mounted via fstab.
Looking at those links you mentioned some questions from my side:
On the NFS server did you use something like /mnt/music /srv/nfs/music none bind 0 0 to bind the directory/directories you want to export via /srv/nfs?
Does your /etc/exports does contain /srv/nfs too?
Did you run exportfs -arv before starting and enabling nfs-server.service?
Almost exactly that as it happens, the music folder is not at /mnt, it’s further within the filesystem, but apart from that, it’s basically what I’ve got.
OK, that’s good. Some years ago while switching from NFS3 to NFS4 this was my main fault.
I am using (rw,fsid=0,no_subtree_check,async) for the root export and (rw,nohide,no_subtree_check,async) for the real shares. But this should not be the cause of your problem.
It seems to be active.
Please run sudo systemctl restart nfs-server.service and then post the output of sudo systemctl status nfs-server.service. Maybe we can find some error messages that point to the root cause.
sudo systemctl status nfs-server.service
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
Drop-In: /run/systemd/generator/nfs-server.service.d
└─order-with-mounts.conf
Active: active (exited) since Sun 2021-11-14 17:14:18 GMT; 16s ago
Process: 11654 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 11655 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
Main PID: 11655 (code=exited, status=0/SUCCESS)
CPU: 10ms
Nov 14 17:14:18 desk exportfs[11654]: exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export...
Nov 14 17:14:18 desk exportfs[11654]: Assuming default behaviour ('no_subtree_check').
Nov 14 17:14:18 desk exportfs[11654]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 17:14:18 desk exportfs[11654]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export...
Nov 14 17:14:18 desk exportfs[11654]: Assuming default behaviour ('no_subtree_check').
Nov 14 17:14:18 desk exportfs[11654]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 17:14:18 desk exportfs[11654]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export...
Nov 14 17:14:18 desk exportfs[11654]: Assuming default behaviour ('no_subtree_check').
Nov 14 17:14:18 desk exportfs[11654]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 17:14:18 desk systemd[1]: Finished NFS server and services.
I’ve left off the client ips of the exports it’s referencing (probably excessive security but…)
I am confused by those messages. It seems to me that there is something wrong in your exports.
Please run journalctl -b -0 -u nfs-server.service and post the output here.
Not giving me much more than the service status I’m afraid…
-- Journal begins at Thu 2020-10-08 07:20:47 BST, ends at Sun 2021-11-14 17:33:27 GMT. --
Nov 14 17:14:18 desk systemd[1]: Stopping NFS server and services...
Nov 14 17:14:18 desk systemd[1]: nfs-server.service: Deactivated successfully.
Nov 14 17:14:18 desk systemd[1]: Stopped NFS server and services.
Nov 14 17:14:18 desk systemd[1]: Starting NFS server and services...
Nov 14 17:14:18 desk exportfs[11654]: exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "xxx.xxx.x.xx:/srv/nfs".
Nov 14 17:14:18 desk exportfs[11654]: Assuming default behaviour ('no_subtree_check').
Nov 14 17:14:18 desk exportfs[11654]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 17:14:18 desk exportfs[11654]: exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "xxx.xxx.x.xa:/srv/nfs".
Nov 14 17:14:18 desk exportfs[11654]: Assuming default behaviour ('no_subtree_check').
Nov 14 17:14:18 desk exportfs[11654]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 17:14:18 desk exportfs[11654]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "xxx.xxx.x.xx:/srv/nfs/music".
Nov 14 17:14:18 desk exportfs[11654]: Assuming default behaviour ('no_subtree_check').
Nov 14 17:14:18 desk exportfs[11654]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 17:14:18 desk exportfs[11654]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "xxx.xxx.x.xa:/srv/nfs/music".
Nov 14 17:14:18 desk exportfs[11654]: Assuming default behaviour ('no_subtree_check').
Nov 14 17:14:18 desk exportfs[11654]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 17:14:18 desk systemd[1]: Finished NFS server and services.
Can you please post your /etc/exports (anonymized, if you want) and inside /etc please run ls -la exports* and post this output. I am trying to find out if your exports is configured right.
That looks fine. I would have configured it a little bit different (see above), but this is not the root cause.
No, that’s not a problem. I just wanted to check if there is another exports file that might cause the trouble.
Can you please post the section [nfsd] from your nfs.conf? Maybe you do not have the right NFS versions configured.
Tried as you suggested, but still getting the same error. I went ahead and tried to mount the export anyway just with mount, but it came back ‘Connection refused’.
Did you restart the NFS server after changing nfs.conf? Sorry, I forgot to mention this above.
Does showmount -e <IP-Address> show the same error as showmount -e servername?