Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second NFS share from OSX fails if the shared folder in on Secondary Volume #1210

Open
4 tasks done
alexrotaru opened this issue Jul 23, 2020 · 3 comments
Open
4 tasks done

Comments

@alexrotaru
Copy link

alexrotaru commented Jul 23, 2020

Description

I am using latest master version (commit 0b0ccce) 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

  1. On a non-system volume, start a new project with the latest Trellis version,
  2. 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.

@github-actions
Copy link

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.

@swalkinshaw swalkinshaw reopened this Jul 23, 2020
@techieshark
Copy link

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?

@alexrotaru
Copy link
Author

alexrotaru commented Jul 21, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants