trellis
trellis copied to clipboard
Second NFS share from OSX fails if the shared folder in on Secondary Volume
- [x] I've read the guidelines for Contributing to Roots Projects
- [x] This request isn't a duplicate of an existing issue
- [x] I've read the docs and followed them (if applicable)
- [x] This is not a personal support request that should be posted on the Roots Discourse community
Description
I am using latest master version (commit 0b0ccce7bf2fe12d2939a74e02825cacabd2a066) and when running vagrant up, I get the following error message:
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.50.1:/Path/to/root/trellis /ansible-nfs
Stdout from the command:
Stderr from the command:
mount.nfs: access denied by server while mounting 192.168.50.1:/Path/to/root/trellis
After lots of googling I found this discussion that states that starting with OSX Catalina, on secondary volumes (= not the system volume group), only one NFS share per volume is permitted. Currently two shares are added in exports file, one for site and one for trellis, so the second is never shared.
Running showmount -e only shows the first entry from the /etc/exports file.
The workaround is to share the root folder of the project, and then on the client system to mount each separate sub-folder.
Steps to reproduce
- On a non-system volume, start a new project with the latest Trellis version,
- Run vagrant up from your command line
Expected behavior: The virtual machine is set-up successfully
Actual behavior: The second NFS share is not mounted because OSX doesn't allow it.
Reproduces how often: all the time on my system using
- OSX 10.15.3
- Vagrant 2.2.9
- ansible 2.9.10
- VirtualBox 6.1.12
Versions
Today's master version
Additional information
Any additional information, configuration or data that might be necessary to reproduce the issue.
Hi @alexrotaru, It looks like the issue template is missing from this issue. Please take a look at the Contribution Guidelines, which will tell you exactly what your ticket has to contain in order to be processable. Please do not use the issue tracker for personal support requests. Use Roots Discourse to ask the Roots community for help, or hire someone from the community.
I have the same issue on OSX 11.4, Vagrant 2.2.17, ansible 2.10.11, Virtualbox 6.1.22
The workaround is to share the root folder of the project, and then on the client system to mount each separate sub-folder.
@alexrotaru could you elaborate on how you did that?
@techieshark I changed what's shared by Vagrant:
- changed this
config.vm.synced_folder File.expand_path("..",local_site_path(site)), nfs_path(name), type: 'nfs' - to this
config.vm.synced_folder local_site_path(site), nfs_path(name), type: 'nfs', nfs_export: false
but then my colleagues that didn't use a mac had an issue this this change, so I had to revert it.
You can manually modify /etc/exports to contain the path to the project root folder (I mean the folder that contains the folders site, trellis, web). in my case this is:
"/System/Volumes/Data/Volumes/HDD2/Path_To_Root_Dir/" -alldirs -mapall=501:0 192.168.50.5
Let me know if you there's anything I can help with.