roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.51k stars 607 forks source link

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

Open alexrotaru opened 4 years ago

alexrotaru commented 4 years ago

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

  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

Versions

Today's master version

Additional information

Any additional information, configuration or data that might be necessary to reproduce the issue.

github-actions[bot] commented 4 years ago

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.

techieshark commented 3 years ago

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 commented 3 years ago

@techieshark I changed what's shared by Vagrant:

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.