[SOLVED] Configuring NFSv4 storage for backups - PVE still trying random ports

mlazzarotto

Member
Dec 30, 2021
24
8
8
33
Hello all,
I've just setup a nfs server (https://help.ubuntu.com/community/NFSv4Howto#NFSv4_Server) on my NAS (a QNAP with Debian installed).
The system should be using NFSv4, and so I manually edited my storage.cfg on PVE as following:
Code:
nfs: nas_proxmox_backups
        path /mnt/pve/nas_proxmox_backups
        server 172.16.101.2
        export /export/proxmox_backups
        options vers=4
        content backup

The settings seem fine to me, but my Proxmox cannot "browse" the nfs share.
Looking at the firewall logs I see that it's trying to connect on the server with random ports, even though (AFAIK) only 2049 should be used for NFS version 4.
Screenshot from 2022-09-15 07-16-06.png
 
Hey,

you can also set the version in the UI, just check the "Advanced" checkbox and a version drop-down appears.
For the port, yes NFS itself only uses 111 and 2049. However, two services (lockd and statd) used by NFS for file locking and status management don't. You can set
Code:
STATD_PORT=<port>
LOCKD_TCPPORT=<port>
LOCKD_UDPPORT=<port>
in your NFS config, so they use a static port and you can setup your firewall accordingly.
 
  • Like
Reactions: mlazzarotto
Hey Hannes,
thank you for the reply.
Some answers on StackOverflow had led me astray in that I thought version 4 used only 2049.
I'll apply that fix on my NFS server.

Thank you!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!