macOS Catalina 配置NFS sync报错解决方案

新版本macOS Catalina (10.15)文件系统调整比较大,导致使用vagrant时nfs sync报错。

NFS is reporting that your exports file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":

exports:2: exported dir/fs mismatch: /Users/ysicing/Work/github/TiGa /System/Volumes/Data

参考网友的方式

It's not a vagrant issue but nfsd/macos issue.
If you add to /etc/exports line:
/Users/USERNAME/Documents
and then run nfsd checkexports, you'll receive:
exports:22: exported dir/fs mismatch: /Users/USERNAME/Documents /System/Volumes/Data

But if you explicitly add path to data volume to /etc/exports:
/System/Volumes/Data/Users/USERNAME/Documents
And run nfsd checkexports it will pass.

So i think it's wrong firmlink handling done by either macos of nfsd

于是修改vagrantfile

  config.vm.synced_folder "/System/Volumes/Data/Users/ysicing/Work/github/TiGa", "/src", type: "nfs", nfs_udp: false

具体可以参考 ysicing/TiGa

Last modification:October 15th, 2019 at 12:26 am
搞技术/肝文章不易,恳请随意打赏 OwO

Leave a Comment