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

Question: Will the nfs plugin create a directory in nfs share if it not exists? #12

Open
pwFoo opened this issue Sep 17, 2018 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@pwFoo
Copy link

pwFoo commented Sep 17, 2018

Default docker nfs support doesn't create the needed directory for the volume (for example by volume name inside of the base nfs share directory).
Is it supported with your plugin?

@trajano
Copy link
Owner

trajano commented Sep 17, 2018

I found that it does not for the GlusterFS plugin. So that functionality is likely not in NFS plugin either. Given that, I may need to provide a way of providing a flag to automatically create the folder as you have stated.

@trajano trajano self-assigned this Sep 17, 2018
@trajano trajano added enhancement New feature or request question Further information is requested labels Sep 17, 2018
@trajano
Copy link
Owner

trajano commented Sep 19, 2018

For NFS, I don't think it is possible given the way I have implemented it. For one, NFS requires the export to be known first. It can't really guess where the base is as shown here device=192.168.1.1:/mnt/routerdrive/nfs .

Gluster on the other hand may be doable because the "subdir" portion is is separate from the mount point.

@pwFoo
Copy link
Author

pwFoo commented Sep 19, 2018

OK, thanks for checking it @trajano.
So there ist just one plugin I have found which works that way I need, but convoy is no more maintained / supported.

@trajano
Copy link
Owner

trajano commented Sep 19, 2018

I wonder how they would do it for NFS. Unless the can control the NFS daemon to create and export other paths which doesn't really sound right.

@pwFoo
Copy link
Author

pwFoo commented Sep 19, 2018

Maybe it mounts the share to local directory and create volumes as sind directory inside of the local mountpoint?

@trajano
Copy link
Owner

trajano commented Sep 19, 2018

The thing is I won't know the "base" export folder.

@pwFoo
Copy link
Author

pwFoo commented Sep 19, 2018

Local mountpoint (for example /var/lib/docker-nfs-volumes) could be a plugin option? So all nfs volumes just local mappings like docker named volumes (/var/lib/docker/volumes).
I think that is the way how convoy works. But it's unmaintained today...

@matzmz
Copy link

matzmz commented Dec 3, 2018

docker-volume-netshare do it, has a special option to create destination folder.

Here (https://github.com/ContainX/docker-volume-netshare/blob/master/netshare/drivers/nfs.go) you may find the implementation, it would be very usefull have the same behaviour

@trajano trajano added the good first issue Good for newcomers label Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants