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

Mounting NFS shared folders fails on MacOSX on vagrant 1.7.4 #45

Closed
alexortizrosado opened this issue Jul 21, 2015 · 2 comments
Closed

Comments

@alexortizrosado
Copy link

After going through the setup steps in the README for running locally, my vagrant instance fails to mount the NFS shared folders:

$ vagrant up
Bringing machine 'herokuwp' up with 'virtualbox' provider...
==> herokuwp: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    herokuwp: Box Provider: virtualbox
    herokuwp: Box Version: >= 0
==> herokuwp: Loading metadata for box 'ubuntu/trusty64'
    herokuwp: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> herokuwp: Adding box 'ubuntu/trusty64' (v20150609.0.10) for provider: virtualbox
    herokuwp: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20150609.0.10/providers/virtualbox.box
==> herokuwp: Successfully added box 'ubuntu/trusty64' (v20150609.0.10) for 'virtualbox'!
'...
==> herokuwp: Configuring and enabling network interfaces...
==> herokuwp: Exporting NFS shared folders...
==> herokuwp: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
The nfsd service does not appear to be running.
Starting the nfsd service
==> herokuwp: 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:'/Users/alexortiz/Development/heroku-wp' /app

Stdout from the command:



Stderr from the command:

stdin: is not a tty
mount.nfs: Connection timed out

I found this stackoverflow answer that seems to suggest the config format for setting up NFS mounts in version 1.6+ is different:

http://stackoverflow.com/questions/26700249/cannot-mount-vagrant-synced-folder-with-nfs

Found the solution for the problem here hashicorp/vagrant#2546

The correct syntax for vagrant version 1.3 to 1.6 is:

config.vm.synced_folder ".", "/vagrant", :nfs => { :mount_options => ["dmode=777","fmode=777"] }

I'm using a brand-new install of vagrant:

$ vagrant --version
Vagrant 1.7.4

I'm on MacOSX 10.10.3

@alexortizrosado
Copy link
Author

I did some further digging and it seems that nfsd service is not started, despite what the startup log suggests:

$ vagrant ssh
$ sudo service nfs-kernel-server status
nfsd not running

When I try starting nfsd, it fails:

$ sudo service nfs-kernel-server start
 * Not starting NFS kernel daemon: no exports.

As the service startup message indicates, /etc/exports doesn't have any export NFS configs:

$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#       to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#

@xyu
Copy link
Owner

xyu commented Jan 26, 2017

I rebuilt the Vagrant environment in af3cd22 and we are now using the native shared folder implementation and not NFS. Hopefully this will make the file syncing more reliable. Seeing as we are not using NFS anymore I'm going to mark this as closed. Thanks for the report!

@xyu xyu closed this as completed Jan 26, 2017
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

2 participants