V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
vonsy
V2EX  ›  Apple

怎样在 macOS Terminal 下挂载 Debian NFS(v4)?

  •  
  •   vonsy · 2021-04-28 14:07:46 +08:00 · 2654 次点击
    这是一个创建于 1065 天前的主题,其中的信息可能已经有所发展或是发生改变。
    怎样在 macOS Terminal 下挂载 Debian NFS(v4)?

    NFS Server, Debian 10
    /etc/exports
    /matrix
    2.2.2.0/24(rw,sync,insecure,fsid=0,crossmnt,no_subtree_check,anonuid=1000,anongid=1000,all_squash) 10.10.10.0/24(rw,sync,insecure,fsid=0,crossmnt,no_subtree_check,anonuid=1000,anongid=1000,all_squash)
    /matrix/zion
    2.2.2.0/24(rw,sync,insecure,fsid=1000,no_subtree_check,anonuid=1000,anongid=1000,all_squash) 10.10.10.0/24(rw,sync,insecure,fsid=1000,no_subtree_check,anonuid=1000,anongid=1000,all_squash)

    NFS Client 1, macOS Big Sur 11.3(Intel)
    使用 Finder - Connect to Server... (快捷键 Command + K), nfs://2.2.2.6/zion, 挂载成功,读,写正常
    Terminal:
    sudo mount -t nfs -o resvport,rw 2.2.2.6:/matrix/zion /private/nfs
    失败提示:mount_nfs: can't mount /matrix/zion from 2.2.2.6 onto /private/nfs: No such file or directory
    mount: /private/nfs failed with 2

    sudo mount -t nfs4 -w -o nodev,nosuid,sync,resvport 2.2.2.6:/matrix/zion /private/nfs
    失败提示:mount: exec /Library/Filesystems/nfs4.fs/Contents/Resources/mount_nfs4 for /private/nfs: No such file or directory
    mount: /private/nfs failed with 72

    sudo mount -t nfs -o nolocks,resvport 2.2.2.6:/matrix/zion /private/nfs
    五国重启了

    NFS Client 2, Ubuntu 20
    sudo mount -t nfs4 -o rw 2.2.2.6:/matrix/zion /mnt, 挂载成功,读,写正常
    4 条回复    2024-03-28 14:37:36 +08:00
    xlvecle
        1
    xlvecle  
       2021-04-28 14:10:42 +08:00
    自带的挂载很多网络协议都有 bug,用 cloudmounter 吧
    AndyZhuAZ
        2
    AndyZhuAZ  
       2021-04-28 15:12:38 +08:00
    v4 不知道,v3 在 finder 里可以直接挂载,terminal 也可以
    lcdtyph
        3
    lcdtyph  
       2021-04-28 15:27:26 +08:00
    我之前是这么挂载的:
    mount -t nfs -o rw,vers=4,noac,resvport,soft,intr host.lan:/share /tmp/nfspoint

    后来转投 netatalk 了,nfs 有时候不太好用
    heha37
        4
    heha37  
       9 小时 56 分钟前
    @lcdtyph

    谢谢,我刚好碰到这个问题,看这个老帖子解决了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1774 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 16:34 · PVG 00:34 · LAX 09:34 · JFK 12:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.