I'm trying to get set up for the first time by following the instructions on the Aegir-up project page. When I run drush vagrant-build --blueprint=aegir, towards the end of the process (after the VM is created and booted), it looks like the NFS folders fail to mount...

[aegir-up] 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 192.168.10.1:'/home/dane/vagrant/projects/mailflow/shared_platforms' /var/aegir/shared_platforms

I'm totally new to Vagrant, so I'm not quite sure how to troubleshoot this. I tried sshing into the box and manually running the above command, but it fails with "only root can do that". If I prefix it with sudo, I get the error mount.nfs: access denied by server while mounting 192.168.10.1:/home/dane/vagrant/projects/mailflow/shared_platforms.

How do I recover from this?

Workaround

Before running drush vagrant-build edit your target blueprint by make the Dir_shares key entry bogus. The blueprint is copied over to the build project.

In case the build failed with a message you may edit the project settings.rb file by invalidating mentioned key.

Note: On MAC OS the step ==> aegir3-dev: Mounting shared folders... takes ages (never stops). so we need to change the _source_

Comments

helmo’s picture

Does your host system have a line in /etc/exports for this path?
And you have the NFS server setup there?

Dane Powell’s picture

Ah, no... the README made it sound like all I need to do was install nfs-kernel-server. I didn't know any additional configuration was required. So I need to manually set up the share at /home/dane/vagrant/projects/mailflow/shared_platforms on the host system?

helmo’s picture

Setting up the export should be handled by (drush-)Vagrant... your symptoms could indicate that this did not happen properly.

Maybe the --verbose output of vagrant-build can give some hints as to what is wrong.

Dane Powell’s picture

What's weird is that I would expect drush vagrant-build to ask for my sudo password if it's going to edit /etc/exports, but it never does.

I tried upgrading drush-vagrant, vagrant, and virtualbox to the latest development releases as well, but still get the error.

Note that this is a completely fresh installation of Ubuntu 13.10, so it should be pretty easy to reproduce.

EDIT: Removed error about Virtualbox / NFS extension versions. I downgraded to Virtualbox 4.1 and still have the problem.

helmo’s picture

Here are two possibly related issues:
#1754384: Support arbitrary NFS options
#2085141: Shared folders not mounted automatically

I've added a link to search multiple issue queue's on the aegir-up project page

Dane Powell’s picture

I'm pretty sure I must be doing something wrong. Surely there's more to configuring the nfs share than just installing nfs-kernel-server?

I've looked through the drush-vagrant and aegir-up code and the only reference I see to nfs is in drush-vagrant/blueprints/default/settings.rb, but it's all commented out. So do I need to create my own blueprint with this config info in it to set up the NFS share?

kangsah’s picture

First you have to create shared_platforms directory. Then edit /etc/exports, change "no_subtree,check" to "no_subtree_check". It works for me, hope it works for you too.

Dane Powell’s picture

@kangsah Thanks for the tip, but /etc/exports already uses no_subtree_check.

dw72’s picture

I have the same issue with Aegir-up :(

helmo’s picture

drush-vagrant/blueprints/default/settings.rb is duplicated to your vagrant project dir on drush vagrant-build.

So e.g. ~/vagrant/projects/foo/settings.rb would be the one to edit to disable the share.

clemens.tolboom’s picture

I've just removed the Dir_shares from settings.rb in the project dir.

clemens.tolboom’s picture

Added a Mac link as that's my problem.

pythagory’s picture

For what it's worth, I ran into this exact problem on Fedora 20. Turned out to be a firewall configuration issue, see https://github.com/mitchellh/vagrant/issues/2447

clemens.tolboom’s picture

Issue summary: View changes

Added a temporary solution

04:18:38 {7.x-2.x *} ~/.drush/aegir-up$ git diff
diff --git a/blueprints/aegir3-dev/settings.rb b/blueprints/aegir3-dev/settings.rb
index c013b92..6ccda31 100644
--- a/blueprints/aegir3-dev/settings.rb
+++ b/blueprints/aegir3-dev/settings.rb
@@ -4,7 +4,7 @@ class Hm < Vm                   # VM-specific overrides of default settings
   Box_url    = "http://dl.dropbox.com/u/937870/VMs/wheezy64.box"
   Shortname  = "aegir3-dev"          # Vagrant name (used for manifest name, e.g., hm.pp)
   Longname   = "Aegir 3 (dev)"     # VirtualBox name
-  Dir_shares = {
+  XXXXXXXXXXXDir_shares = {
                  "aegir-up" => {
                    "host_path"  => "shared_platforms",
                    "guest_path" => "/var/aegir/shared_platforms",
clemens.tolboom’s picture

Issue summary: View changes

  • helmo committed 42ddd48 on 7.x-2.x
    Issue #2134253 by Dane Powell, clemens.tolboom: Mounting NFS share fails...
helmo’s picture

Status: Active » Fixed

I've now disabled the Dir_shares block ... hope it helps those who don't need it.

clemens.tolboom’s picture

Just reading http://docs.vagrantup.com/v2/synced-folders/index.html do discover we have at least on shared folder namely the project folder.

Question is how does vagrant do this differently from a NFS mount? Or I my mac working suddenly?!?

clemens.tolboom’s picture

Status: Fixed » Active

Follow http://docs.vagrantup.com/v2/synced-folders/basic_usage.html we can set any mount into the Vagrantfile

Trouble is this file is symlinked into drush-vagrant. Why symlinked? Why not copied over and adjusted to out wished?

It would make development way simpler ... no need for shelling into the VM + having git credentials + patch workflow + IDE

What do I miss?