error (500) adding nfs storage - ubuntu server

pedeb

New Member
Sep 2, 2026
4
1
3
I can manually mount my nfs share on my ubuntu server from the proxmox console.
I can also ping my ubuntu server from the proxmox consoie.
I can add the nfs share on the web interface if I uncheck the 'enable', but that still makes it unseable.
$ showmount -e <my server> does not show the exports for some reason, so I'm thinking that is the issue but I don't know why showmount is not working.

I have added samba storage to my sever ok.

Not sure what I am missing with NFS strorage.
 
Hard to tell what is actually wrong here from the information you have provided.
Can you post the output of the following commands (run these on ubuntu):
Code:
exportfs -v
and
Code:
cat /etc/exports

Also make sure to check that everything is up an running on the ubuntu host:
Code:
systemctl status rpcbind nfs-kernel-server

Check the journal
Code:
journalctl -n 100 --no-pager
for errors on both the ubuntu host as well as you proxmox host.

Due to the fact that 'showmount -e <target-ip> does not work the commands below will most likely also not work, but usually you can setup nfs using the following commands:

Code:
pvesm scan nfs <target-ip>
this should print the exported share:
Code:
/mnt/nfs <target-ip>

If you see a share here you should be able to mount it using:
Code:
pvesm add nfs <some-storage-id> --server <target-ip> --export <share-path>
 
Thanks for providing more information.
The configurations of the nfs export seem to be fine and the services are also running.

What I did notice in the logs is that you have setup the ufw (uncomplicated firewall) on your ubuntu host. This might be blocking the NFS share from working properly.

Code:
Sep 02 17:56:42 server kernel: [UFW BLOCK] IN=eno1 OUT=
MAC=01:00:5e:00:00:01:c8:7f:54:e6:37:08:08:00 SRC=192.168.50.1 DST=224.0.0.1 LEN=36
TOS=0x00 PREC=0x00 TTL=1 ID=40924 DF PROTO=2

You can try to disable it temporarily to see if this resolves the issue:
Code:
sudo ufw disable
sudo ufw status

You can enable the firewall again using the following command:
Code:
sudo ufw enable

If disabling helps you will need to make sure to open up the ports needed for nfs on the ubuntu host. Usually the following is needed:
Code:
sudo ufw allow from 192.168.50.0/24 to any port 111
sudo ufw allow from 192.168.50.0/24 to any port 2049
sudo ufw reload

and to verify you can run
Code:
sudo ufw status
 
My ufw did not have 9 (111 port) so I added it, but $ showmount -e 192.168.50.46 still did not work.
However when i disabled ufw it worked!

Can you see anything in my ufw that would be stopping it.

peter@server:~$ sudo ufw status numbered
Status: active

To Action From
-- ------ ----
[ 1] Samba ALLOW IN Anywhere
[ 2] 22/tcp ALLOW IN Anywhere
[ 3] 123 ALLOW IN Anywhere
[ 4] 80/tcp ALLOW IN Anywhere
[ 5] 5201/tcp ALLOW IN Anywhere
[ 6] 5201/udp ALLOW IN Anywhere
[ 7] 2049 ALLOW IN 192.168.50.176
[ 8] 2049 ALLOW IN 192.168.50.0/24
[ 9] 111 ALLOW IN 192.168.50.0/24
[10] Samba (v6) ALLOW IN Anywhere (v6)
[11] 22/tcp (v6) ALLOW IN Anywhere (v6)
[12] 123 (v6) ALLOW IN Anywhere (v6)
[13] 80/tcp (v6) ALLOW IN Anywhere (v6)
[14] 5201/tcp (v6) ALLOW IN Anywhere (v6)
[15] 5201/udp (v6) ALLOW IN Anywhere (v6)
 
Alright, the fact that it worked with the firewall being disabled narrows down the issue.

It seems like the NFS mount daemon (rpc.mountd) might be using a random port, which then in turn is blocked by the ufw.

Configuring a fixed port here and opening the firewall for that port might resolve the issue. You can do this by editing the file
Code:
/etc/nfs.conf
and setting:
Code:
[mountd]
port=20048
for example.

afterwards you will need to restart the service:
Code:
sudo systemctl restart nfs-kernel-server

and add the port to the firewall.
 
Last edited:
  • Like
Reactions: waltar