我为 Proxmox 设置了一个 NFS 服务器,以便在那里远程备份 VM 映像。由于某种原因,Proxmox 盒无法连接到 NFS 服务器。我测试了与另一台服务器上的另一个 NFS 客户端连接,它工作正常。我不确定哪里出了问题,因为就客户端的命令而言,它做支持这些连接类型(版本 3 和 4)。我不确定我在这里遗漏了什么。
为简单起见,IP 替换为 SERVER_IP 和 CLIENT_IP
坐骑列表:
root@client:~# showmount SERVER_IP -e
Export list for SERVER_IP:
/export/backups CLIENT_IP/32
/export CLIENT_IP/32
支持的协议列表:
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
尝试挂载远程导出:
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
我的/etc/exports
服务器上:
/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
是mount --rbind /home/backups /export/backups
。1010 是备份用户的 uid 和 gid。
唯一编辑的设置是/etc/conf.d/nfs
:
OPTS_RPC_NFSD="8 -N 2 -V 3 -V 4 -V 4.1"
有人有什么想法吗?提前致谢。
答案1
根据 Zacq 的评论重新启动服务器
这不是任何人在生产 Proxmox 服务器上都想听到的解决方案,但它确实有效。必须有一个 /etc/init.d/[something] 重启类型修复。
和 OP 的症状一模一样。
此外,客户在 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)