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

Quick fix for NFS/Synced Folder issues #7

Open
acao opened this issue Nov 11, 2013 · 6 comments
Open

Quick fix for NFS/Synced Folder issues #7

acao opened this issue Nov 11, 2013 · 6 comments

Comments

@acao
Copy link

acao commented Nov 11, 2013

In several environments, I've run into issues around the nfs setup - specifically with an error referring to permissions issues while mounting the directory.

By changing

if not is_windows
    config.vm.synced_folder "www", "/var/www", :nfs => true
  else

to

if not is_windows
    config.vm.synced_folder "www", "/var/www", :nfs => false
  else

You can disable NFS support which, while it may be less performant, can get you around these nfs related issues until a better solution is worked out.

@tizzo
Copy link
Contributor

tizzo commented Nov 12, 2013

I'm hesitant to make this change, in addition to performance Virtualbox native file sharing does not support symliniks which can cause a lot of problems. I have been thinking of adding a configuration file to easily change settings like this in a more user friendly way. I'm inclined to include this as a setting and perhaps false is the safest options.

@acao
Copy link
Author

acao commented Nov 12, 2013

Ah yeah I wouldn't suggest it as a change, NFS is preferred and suggested even by Vagrant. I would keep it set to true in the repo because I've been running into these very problems (for example, I cant mount folders with sshfs in the guest machine, however i got around this by running sshfs from the host machine and mounting it inside the shared folder).

I just thought I would post it in the issue queue as a quick workaround for people who don't have time to fiddle with NFS issues and are willing to take shortcuts.

The particular issue I'm having is one I've had with other host/guest machines as well, so once I get a chance I'll be happy to spend some time debugging it. My theory is that its a version mismatch between nfsd on the machines, and that potentially rectifying this by providing something in the puppet manifests for the client somehow would provide a more thorough solution.

@mmcintosh
Copy link

I had troubles with nfsd versions in Ubuntu 13.04 that is my daily driver.
I tried the move to false but still had issues will post results later in
the week. I did not spend enough time testing it out to see if I had any
other errors.

Thanks

On Tue, Nov 12, 2013 at 3:21 PM, acao notifications@github.com wrote:

Ah yeah I wouldn't suggest it as a change, NFS is preferred and suggested
even by Vagrant. I would keep it set to true in the repo because I've been
running into these very problems (for example, I cant mount folders with
sshfs in the guest machine, however i got around this by running sshfs from
the host machine and mounting it inside the shared folder).

I just thought I would post it in the issue queue as a quick workaround
for people who don't have time to fiddle with NFS issues and are willing to
take shortcuts.

The particular issue I'm having is one I've had with other host/guest
machines as well, so once I get a chance I'll be happy to spend some time
debugging it. My theory is that its a version mismatch between nfsd on the
machines, and that potentially rectifying this by providing something in
the puppet manifests for the client somehow would provide a more thorough
solution.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-28329472
.

@andrewmallis
Copy link

Word-of-mouth, but no real-world experience, pointed me to Virtualbox native file sharing on Windows host systems actually being quite good, unlike the time-waster it is on the Mac side of things. I have no one to attribute this too, so to be taken with a grain of salt…

@tizzo
Copy link
Contributor

tizzo commented Nov 12, 2013

Well, on any platform they don't support symlinks right?

On Tue, Nov 12, 2013 at 4:21 PM, Andrew_Mallis notifications@github.comwrote:

Word-of-mouth, but no real-world experience, pointed me to Virtualbox
native file sharing on Windows host systems actually being quite good,
unlike the time-waster it is on the Mac side of things. I have no one to
attribute this too, so to be taken with a grain of salt…


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-28334491
.

@sk33lz
Copy link
Contributor

sk33lz commented Feb 18, 2016

The lines for this have changed a bit at this point. I'm going to do some testing on my Windows box later tonight and see if this issue has been resolved. Here are the current lines as of this comment:

# NFS sharing does not work on windows, so if this is windows don't try to start it.
  vagrant_share_www = "false"
  if not is_windows and params['sync_folder']
    config.vm.synced_folder 'www', '/var/www', :nfs => true
    vagrant_share_www = "true"
  elsif params['sync_file_enabled_on_windows']
    # This uses VirtualBox shared folders and symlinks will not work properly.
    config.vm.synced_folder 'www', '/var/www'
    vagrant_share_www = "true"
  end

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

5 participants