-
Notifications
You must be signed in to change notification settings - Fork 59
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
Comments
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. |
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 Gluster on the other hand may be doable because the "subdir" portion is is separate from the mount point. |
OK, thanks for checking it @trajano. |
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. |
Maybe it mounts the share to local directory and create volumes as sind directory inside of the local mountpoint? |
The thing is I won't know the "base" export folder. |
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). |
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 |
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?
The text was updated successfully, but these errors were encountered: