I just upgraded to Mac OS Catalina and when running
I got the following error when exporting NFS shared folders:
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/jannick/Code/sites/SITENAME/site /System/Volumes/Data exports:3: exported dir/fs mismatch: /Users/jannick/Code/sites/SITENAME/trellis /System/Volumes/Data
According to this open vagrant issue it is an issue with nfsd/macos.
I found a workaround that worked for me as long as this issue hasn’t been fixed.
Shut down all your running virtual machines.
Remove the affected lines in your
/etc/exportsfile. They are shown in the error message above and look something like that:
# VAGRANT-BEGIN: 501 13b5d65d-55fe-4d23-80bf-38fb242a79b7
/Users/jannick/Code/sites/SITENAME/site 192.168.50.5 -alldirs -mapall=501:20
/Users/jannick/Code/sites/SITENAME/trellis 192.168.50.5 -alldirs -mapall=501:20
# VAGRANT-END: 501 13b5d65d-55fe-4d23-80bf-38fb242a79b7
Correct two lines in your Vagrantfile:
Change this line
config.vm.synced_folder local_site_path(site), nfs_path(name), type: 'nfs'
config.vm.synced_folder '/System/Volumes/Data/' + local_site_path(site), nfs_path(name), type: 'nfs'
and this line
config.vm.synced_folder ANSIBLE_PATH, '/ansible-nfs', type: 'nfs'
config.vm.synced_folder '/System/Volumes/Data/' + ANSIBLE_PATH, '/ansible-nfs', type: 'nfs'
Everything should work out fine.