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

It is possible to use fsevents_to_vm with standard NFS server ? #231

Closed
paolomainardi opened this issue Jan 25, 2017 · 3 comments
Closed

Comments

@paolomainardi
Copy link

Hello, thanks for your hard work, very much appreciated!
I have 2 questions:

  1. Why have you choosed unfsd instead of native nfs server ? It is seems to be 30% slower than the kernel one, we are building a very complex drupal application in almost 12 minutes more (42 instead of 30).

  2. I am trying to mount Users using the standard nfs driver (using docker-machne-nfs) it is mounted and it works fine, but trying to debug fsevents_to_vm i see that events gets sended to vm:

cli ❯ fsevents_to_vm start --debug --ssh-identity-file ~/.docker/machine/machines/dinghy/id_rsa --ssh-ip $(dinghy ip)
Watching /Users/paolomainardi and forwarding events to Dinghy VM...
touching 201701251012.22:/Users/paolomainardi/tmp/prova
touching 201701251012.37:/Users/paolomainardi/tmp/ciao
touching 201701251012.55:/Users/paolomainardi/tmp/ciao
touching 201701251012.56:/Users/paolomainardi/tmp/ciaoasdfasdf
touching 201701251012.58:/Users/paolomainardi/tmp/ciaoasdfasdf12341234
touching 201701251014.35:/Users/paolomainardi/tmp/ciaoasdfasdf12341234
touching 201701251014.39:/Users/paolomainardi/tmp/ciao

But i can't see events reach the VM:

root@c7e287e86ee3:/fstest/tmp# inotifywait .
Setting up watches.
Watches established.

Thanks!

@codekitchen
Copy link
Owner

I've answered that before but I can't find it now... I'll add something to the FAQ. There's two main reasons we didn't go with the OSX system NFS, both related to the fact that we wanted to expose the user's entire $HOME dir the same way that docker-machine does:

  1. I wasn't able to lock down the system NFS server to the extent that I felt comfortable exposing the user's entire home directory using it.
  2. The system NFS server doesn't allow nested exports -- in other words, if you export /Users/me, you can't also export /Users/me/some-other-project. This is a problem for us, because we have projects using Vagrant with NFS shares, and so exposing the whole home dir broke those Vagrant projects.

At first glance I don't see why your test wouldn't work. Have you confirmed that the same test works for you using Dinghy's default NFS setup?

@paolomainardi
Copy link
Author

@codekitchen thanks a lot for your reply, everything is quite crystal clear now.

I found why fsevent_to_vm doesn't work, because the container should mount the absolute path, the provided example here: https://github.com/codekitchen/fsevents_to_vm#testing is broken.

In order to test it you should do:

docker run --rm -it -v /Users/user/somedir:/Users/user/somedir ubuntu:trusty
apt-get update && apt-get install -y inotify-tools
inotifywait /Users/user/dir

Anyway, i think that having an option to just use the osx nfs server should be added, because the performance loose using unfsd is quite high, up to 30% in our case.

Is there a way to install dinghy without installing/running the unfsd server ?

@codekitchen
Copy link
Owner

Closing in favor of #274

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