4

I have a vagrant VM (virtualbox) setup with meteor. My host and guest are both Ubuntu. The VM contains a vboxfs share folder setup through the Vagrantfile. The behavior I am noticing is similar to a NFS mount.

I am able to create a meteor project in this shared folder, but when I run the project I get errors pointing to mongodb.

If I follow instructions on https://github.com/pixelhandler/vagrant-dev-env/blob/master/README.md my app works just fine.

Upon further investigation it seems that MongoDB does not work on NFS shares, http://www.mongodb.org/display/DOCS/NFS

Has anyone else run in to this issue? and if so, have you figured out a (non-rsync) solution?

I plan to send link of this question to 10gen, perhaps someone from their team can answer it.

Nertim
  • 380
  • 6
  • 15

3 Answers3

6

Not sure what Mongo's plans are re running on NFS / vboxfs, but you could work around this by running your own MongoDB not in the shared folder (eg, use the ubuntu mongodb package). Use the MONGO_URL environment variable to tell meteor where to connect. If you pass this variable, meteor will not try to start MongoDB in the meteor project directory.

n1mmy
  • 2,489
  • 1
  • 19
  • 15
4

You can move the data dir somewhere inside the VM, and use a symlink from the vagrant folder:

cd /vagrant/.meteor/local
ln -s ~/db/

This means the data will not be shared, but you probably want it git ignored anyway.

(https://grahamrhay.wordpress.com/2013/06/18/running-meteor-in-a-vagrant-virtualbox/)

grahamrhay
  • 2,046
  • 4
  • 19
  • 29
  • Is just the MonoDB data stored in .meteor/local? I've seen other solutions what mount the entire .meteor folder, but that screws up meteorite. – mpen Aug 21 '13 at 19:30
  • If `/vagrant` is an NTFS, `ln -s` says `ln: failed to create symbolic link ‘./homedb’: Protocol error` though it might be possible with a [`mklink`](http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/) to an FS that `ln` understands. – Cees Timmerman Jun 16 '15 at 10:46
0

grahamrhay's solution would not work with the vagrant box started on Windows. There is no way to make symbolic links on windows for vagrant, at least not for administrator accounts.