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

Multiple NFS shares #121

Merged
merged 2 commits into from
Aug 5, 2017
Merged

Multiple NFS shares #121

merged 2 commits into from
Aug 5, 2017

Conversation

huguesalary
Copy link
Contributor

Added the ability to setup multiple NFS Shares
By default (changeable with xhyve-experimental-nfs-share-root, see below) NFS shares are rooted at /xhyve-nfsshares to avoid the situation where a NFS Share /usr would be mounted at /usr

2 backward incompatible changes:

  • renamed xhyve-experimental-nfs-share to xhyve-experimental-nfs-share-enable
  • change xhyve-experimental-nfs-share from being a boolean to a string slice taking multiple path to be shared via NFS
  • NFS Shares are now mounted under a default directory /xhyve-nfsshares (the old code was mounting everything under / causing, for example, /usr to be mounted at /usr)

Other change:

  • add xhyve-experimental-nfs-share-root to allow specifying where in the guest the NFS Shares will be rooted at

Here's an example of how to use:

docker-machine -D create -d xhyve --xhyve-disk-size 40000 --xhyve-memory-size 4000 --xhyve-cpu-count 2 --xhyve-experimental-nfs-share-enable --xhyve-experimental-nfs-share /Users --xhyve-experimental-nfs-share /usr/ --xhyve-experimental-nfs-share-root /nfsharesfromhost test

This command will share the host folders /Users and /usr in the guest at /nfsharesfromhost/Users and /nfsharesfromhost/usr

@razic
Copy link

razic commented May 24, 2016

Just curious what the status of this is?

@jaredallard
Copy link

Please merge!

@zchee zchee added the feature label Jun 29, 2017
@huguesalary
Copy link
Contributor Author

Hi there,

Would rebasing this on top of the latest master allow it to be merged?

@zchee
Copy link
Member

zchee commented Jul 13, 2017

@huguesalary Oh, thanks reply. and Sorry for very late reply...
Now, @dlorenc developing #189, So maybe we will switch to Docker for Mac instead of xhyve cgo binding.
So, remove originally xhyve interface, also use osxfs disk sharing by default.

Current disk sharing is two options. virtio-9p or NFS.
virtio-9p sharing uses lib9p, so if switching to Docker for Mac, will remove lib9p code because Docker for Mac internal's virtio-9p is different to lib9p. But AFAIK, we can leave the NSF option because that's use enable with ssh (bootscript hack).

So, If you try to rebase to master, I want to merge this PR. However, @dlorenc is implementing #189, I want to hear his opinion.

@huguesalary
Copy link
Contributor Author

Thanks @zchee for the context.

I think keeping the NFS option is valuable. osxfs is still incredibly slow and personally the only way I've been able to have a usable docker machine was by using NFS.

At worst it gives people the option to use NFS.

I'll try to rebase and resubmit soon.

@dlorenc
Copy link
Collaborator

dlorenc commented Jul 13, 2017

Yeah this nfs implementation should be fine to keep. If anything we might standardize some flags on the minikube side, but it won't effect this.

@huguesalary
Copy link
Contributor Author

huguesalary commented Jul 13, 2017

Alright just rebased this on the latest master

@zchee
Copy link
Member

zchee commented Jul 16, 2017

@huguesalary Thanks!! I’ll merge it after checking.

…experimental-nfs-share` flag allowing for multiple NFS Shared folders
By default (changeable with `xhyve-experimental-nfs-share-root`, see below) NFS shares are rooted at /xhyve-nfsshares to avoid the situation where a NFS Share `/usr` would be mounted at `/usr`

2 backward incompatible changes:
- renamed `xhyve-experimental-nfs-share` to `xhyve-experimental-nfs-share-enable`
- change `xhyve-experimental-nfs-share` from being a boolean to a string slice taking multiple path to be shared via NFS
- NFS Shares are now mounted under a default directory /xhyve-nfsshares (the old code was mounting everything under `/` causing, for example, `/usr` to be mounted at `/usr`)

Other change:
- add `xhyve-experimental-nfs-share-root` to allow specifying where in the guest the NFS Shares will be rooted at

Here's an example of how to use:

`docker-machine -D create -d xhyve --xhyve-disk-size 40000 --xhyve-memory-size 4000 --xhyve-cpu-count 2 --xhyve-experimental-nfs-share-enable --xhyve-experimental-nfs-share /Users --xhyve-experimental-nfs-share /usr/ --xhyve-experimental-nfs-share-root /nfsharesfromhost test`

This command will share the host folders /Users and /usr in the guest at /nfsharesfromhost/Users and /nfsharesfromhost/usr
@zchee
Copy link
Member

zchee commented Jul 25, 2017

@huguesalary sorry, i'm busy. I'll check today.

@huguesalary
Copy link
Contributor Author

No worries! Take your time.

@zchee zchee merged commit 5ed10e7 into machine-drivers:master Aug 5, 2017
@zchee
Copy link
Member

zchee commented Aug 5, 2017

@huguesalary merged. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants