NFS4 only servers for storage cannot be configured from interface

_ED

Member
Jul 11, 2012
5
0
21
Hi,

I switched my storage server from NFS 2,3,4 to only NFS4, now no NFS is exposed with the RPCBind thing (used only with NFS 2,3 as far as i understand)
and my proxmox servers are not able anymore to access my share, i tried to remove under the storage section my server and to re-add it
but it fails,
i tried:
Code:
pvesm nfsscan 10.10.10.199
clnt_create: RPC: Program not registered
command '/sbin/showmount --no-headers --exports 10.10.10.199' failed: exit code 1

and here i believe the problem is that showmount only work with nfs2,3 but not with 4 because it uses RPCbind that is not used with NFS4
I believe one solution to this is to not run showmount when a user specifies NFS4 like here: Screenshot_20200806_122407.png
but instead just run the mount command right away.

is there also a dirty temporary fix to add a nfs share manually with some commands? (I could also try to replace /sbin/showmount with /bin/true or some crap like that)
 
The idea in this case would be to mount via the fstab or systemd, whatever you feel more comfortable with. Then create a directory storage on the mount point. Once you have the directory storage defined, open the /etc/pve/storage.cfg and add the following lines to the directory storage:
Code:
is_mountpoint 1
mkdir 0
These tell PVE that it should not create the directory if it does not exist and that it should wait until something is mounted there.
 
  • Like
Reactions: AbsolutelyFree
how does one set the mountable flag in storage.cfg ?


Something like this

Code:
dir: local
    path /var/lib/vz
    content snippets,backup,rootdir,vztmpl,images,iso
    maxfiles 0
    shared 1
    is_mountpoint 1
     mkdir 0

and /etc/fstab
You have following entry


<ip of nfs>: <shared directory> /var/lib/vz nfs rw,hard 0 0
 
  • Like
Reactions: RobFantini
i figured out it was the is_mountpoint flag and after trying a little bit i understood it works on the "dir" type storage, not the nfs one,
added to fstab and now it works thanks!

Anyway i think my problem will get more common in the years to come since RPC has a few security problems and distros might actually default to nfs4 only that is pretty mature now (a part from ACLs...) so i think this might need to be adressed in the future, thanks!

P.S. looking forward to try the new proxmox backup thing as soon as i have some spare time :)
 
Just a note that the problem still seems to be here. Had to downgrade to nfsv3 to get NFS working.
 

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!