mineshaftgap / d4m-nfs

Docker for Mac with NFS for performance improvements over osxfs
296 stars 26 forks source link

Vagrant entries in /etc/exports causes ./d4m-nfs.sh to fail #45

Closed leolandotan closed 7 years ago

leolandotan commented 7 years ago

Hi guys,

I'm trying to set this up with Docker for Mac on Yosemite. Currently I have projects on Vagrant and I noticed some entries on /etc/exports. When I run ./d4m-nfs.sh, I get an error:

d4m-nfs git:(master) /bin/bash d4m-nfs.sh
[d4m-nfs] Copy the Moby VM APK Cache back.
exports:28: /Users/leotan conflicts with existing export /Users/leotan/Documents/vm/myproject
[d4m-nfs] Something is wrong with your /etc/exports file, please check it.

Currently to test if this is working, I just created a backup of my exports file with the Vagrant entries.

Is there a way that they can work together?

Thanks!

if-kenn commented 7 years ago

@leolandotan this is less about d4m-nfs and more about BSD NFS, you cannot export both a directory and a sub directory that is on the same volume.

leolandotan commented 7 years ago

@if-kenn Thank you for your prompt response! Currently have not enough idea on exports but by what you've explained I understood that Vagrant and d4m-nfs cannot "run" together.

As a workaround, would switching the exports file work like if I'm working with a project in Vagrant, I'll use the export file for Vagrant and same when I'll use Docker?

Would you recommend this?

if-kenn commented 7 years ago

I would recommend a wrapper script to do this kind of work for you, and always call it. So one script copies the Vagrant etc/exports into place and brings up your Vagrant env, and one script does the same for dfm-nfs.

The wrapper script could even error out if the other environment is found to be running.

leolandotan commented 7 years ago

@if-kenn Ah! Sounds really better than my idea! Haven't tried to create wrapper scripts but will definitely go this route.

Thank you very much!

if-kenn commented 7 years ago

@leolandotan closing this issue, good luck!