2

I set up an NFS serve for Proxmox to remotely backup VM images there. For some reason the Proxmox box won't connect to the NFS server. I tested connecting with another the NFS client on a different server and it worked fine. I'm not sure what's wrong because as far as the client's commands say, it does support these connection types (version 3 and 4). I'm not sure what I'm missing here.

IPs replaced with SERVER_IP and CLIENT_IP for simplicity

List of mounts:

root@client:~# showmount SERVER_IP -e
Export list for SERVER_IP:
/export/backups CLIENT_IP/32
/export         CLIENT_IP/32

List of supported protocols:

root@client:~# rpcinfo -p SERVER_IP | egrep "service|nfs"
   program vers proto   port  service
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs

Trying to mount the remote export:

root@client: mkdir -p /nfs/backups
root@client:~# mount SERVER_IP:/export/backups /nfs/backups -vv
mount.nfs: timeout set for Wed Apr 27 17:55:34 2016
mount.nfs: trying text-based options 'vers=4,addr=SERVER_IP,clientaddr=CLIENT_IP'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=SERVER_IP'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying SERVER_IP prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying SERVER_IP prog 100005 vers 3 prot UDP port 38873
mount.nfs: mount(2): Protocol not supported
mount.nfs: Protocol not supported

My /etc/exports on the server:

/export CLIENT_IP/32(rw,sync,no_subtree_check,sec=sys,fsid=0)
/export/backups CLIENT_IP/32(rw,sync,no_subtree_check,all_squash,anonuid=1010,anongid=1010)

/export/backups is mount --rbind /home/backups /export/backups. 1010 is the uid and gid for the backups user.

The only edited setting in /etc/conf.d/nfs:

OPTS_RPC_NFSD="8 -N 2 -V 3 -V 4 -V 4.1"

Does anyone have any ideas? Thanks in advance.

Salis
  • 201
  • 1
  • 2
  • 7
  • Try: mount -o rw,vers=2 SERVER_IP:/export/backups /nfs/backups -vv – Valeriy Solovyov Apr 28 '16 at 13:21
  • @ValeriySolovyov rpcbind shows v3 and v4. – kofemann Apr 28 '16 at 13:54
  • @Salis: try with '-o tcp' and check trat mountd is running – kofemann Apr 28 '16 at 13:54
  • @kofemann I tried enabling v2 as well as v3 and v4, I tried all of your suggestions and still no luck. I can connect fine from other servers so I'm assuming this is something wrong with Proxmox's NFS client, perhaps an old version. I accomplished the same thing with Samba instead, and that works even if it's a bit slower. Thanks for your help anyway. – Salis Apr 28 '16 at 20:20
  • I had the exact same issue of the NFS client failing with “Protocol not supported”. This started happening just after [upgrading a running server to Proxmox 4.2](http://pve.proxmox.com/wiki/Downloads#Proxmox_Virtual_Environment_4.2_.28ISO_Image.29) - and judging by the date of the question, I guess the OP did the same, since this April 27th was the date of the Proxmox 4.2 release. In a maintenance window I had to reboot the server and after that the issue was gone. –  May 09 '16 at 18:37
  • The only thing I can think of is that the running, older, kernel was incompatible with a library/binary of the newer NFS client, but since I already rebooted I can't (read: wont try to) verify the reproduction steps nor if this is in fact a "solution". But I spent some time, before posting the first time, trying to find out what changed in the kernel version that would have caused this to happen - I had hoped to find out that simply restarting a init.d script - but no luck. –  May 09 '16 at 18:37

1 Answers1

5

Reboot server as per Zacq's comment

Not the solution anyone wants to hear on a production Proxmox server, but it works. There must be an /etc/init.d/[something] restart type fix.

Had exactly the same symptoms as OP.

In addition client was complaining in dmesg

nfsv3: disagrees about version of symbol nlmclnt_proc
nfsv3: disagrees about version of symbol nfs_alloc_client
nfsv3: disagrees about version of symbol nfs_access_zap_cache
nfsv3: disagrees about version of symbol nfs_submount
nfsv3: disagrees about version of symbol nfs_create_server
nfsv3: disagrees about version of symbol nfs_post_op_update_in$
nfsv3: disagrees about version of symbol nfs_mkdir
nfsv3: disagrees about version of symbol nfs_get_client
nfsv3: disagrees about version of symbol nfs_file_operations
nfsv3: disagrees about version of symbol nfs_lookup
nfsv3: disagrees about version of symbol nfs_getattr
nfsv3: disagrees about version of symbol register_nfs_version
nfsv3: disagrees about version of symbol nfs_setattr
nfsv3: disagrees about version of symbol unregister_nfs_version
nfsv3: disagrees about version of symbol nfs_sops
nfsv3: disagrees about version of symbol nfs_link
nfsv3: disagrees about version of symbol nfs_try_mount
nfsv3: disagrees about version of symbol nfs_close_context
nfsv3: disagrees about version of symbol nfs_symlink
nfsv3: disagrees about version of symbol nfs_clone_server
nfsv3: disagrees about version of symbol nlmclnt_proc
nfsv3: Unknown symbol nfs_writeback_update_inode (err -22)
nfsv3: Unknown symbol nfs_dentry_operations (err -22)
David McNeill
  • 196
  • 1
  • 10