-
Notifications
You must be signed in to change notification settings - Fork 174
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
Correct way to mount NFS share #8623
Comments
Just as this doc(https://vmware.github.io/vic-product/assets/files/html/1.5/vic_vsphere_admin/backup_volumes.html) shows, you should first create a NFS-type volumeStore, and then use this volumeStore to create docker volume. And this is the only way to create NFS Shared Volumes in VIC
|
Thanks, so I would need to redeploy the vch, there's no way to reconfigure a running one? |
It's ok to reconfigure the VCH. See the "Add Volume Stores" section in this doc: https://vmware.github.io/vic-product/assets/files/html/1.5/vic_vsphere_admin/configure_vch.html |
I'm not sure what I've done wrong but the mount options appear to be wrong? C:\Users\burningsky>vic-machine-windows configure --target vcenter.domain.local --user [email protected] --password password --thumbprint xxxxxxxxxxxxxx --id virtual-container-host --volume-store VM SAS 15K/DockerFolder:default --volume-store VM SAS 15K/DockerFolder:DockerVolume --volume-store nfs://192.168.0.14/Multimedia?uid=0&gid=0&proto=tcp:NFSMultimedia |
It seems the windows shell could not parse special characters. Please try to use quote like |
I did give that a try before but no luck: C:\Users\burningsky>vic-machine-windows configure --target vcenter.domain.local --user [email protected] --password password --thumbprint xxxxxxxxxxxxxx --id virtual-container-host --volume-store VM SAS 15K/DockerFolder:default --volume-store VM SAS 15K/DockerFolder:DockerVolume --volume-store "nfs://192.168.0.14/Multimedia?uid=0&gid=0&proto=tcp:NFSMultimedia" |
So I tried from linux but got a similar response: Then I tried to get the current config but it failed on the ID, but that is the name of the VCH, is there another ID other than its name and if so how do I find it? |
|
Thanks, the single quotes worked but now I'm running into a timeout error, any idea what's causing that? [burningsky@engal ~]$ vic-machine-linux configure --target vcenter.domain.local --user [email protected] --password password --thumbprint xxxxx --id vm-298 --volume-store 'VM SAS 15K/DockerFolder:default' --volume-store 'VM SAS 15K/DockerFolder:DockerVolume' --volume-store 'nfs://192.168.0.14/Multimedia?uid=0&gid=0&proto=tcp:NFSMultimedia' |
Shall I just add more timeout and see if it completes? How much should I add? |
If I check the config of the vch is is showing the new datastore in there, and the vcenter is reporting constant reconfigurations on the container VMs now... Something strange is going on |
It is probably due to failing to connect the nfsserver.
|
I can't see anything NFS related but the error loop in there has been going constantly from then until now: |
I've restared the vic and vch containers but the containers are still constantly reconfiguring |
I also can't connect to the docker now: |
That'r really weird.
Thanks. |
I mistyped the path to the NFS, woops. Can I remove it from the config and add the correct path or can you not remove volumes even if they aren't working? |
em... We didn't support change volume-stores. |
Glad to help! End users are good for testing haha. I will redeloy the VCH and see if it goes smoother. |
Making good progress, is there any way to mount an NFS share into the container rather than having to create a shared volume? It would be a pain to have to move all of my data |
We don't support other ways. |
So I want to be able to access data shared with servers as well as the containers. The file structure is /mnt/user/data, but if I put that at as the volume location then it creates the ../volumes/data so I end up with /mnt/user/data/volumes/data. I want the container to have access directly into /mnt/user/data |
Any movement on this one? |
Question
I want to be able to mount a rw share into a container, I have tried some Docker specific methods but they don't appear to work. Is there a way to do it with VIC?
See also
[burningsky@engal ~]$ export NFS_VOL_NAME=nfs NFS_LOCAL_MNT=/mnt/nfs NFS_SERVER=192.168.0.14 NFS_SHARE=/data/nfs NFS_OPTS=vers=4,soft
docker --tls run --mount "src=$NFS_VOL_NAME,dst=$NFS_LOCAL_MNT,volume-opt=device=:$NFS_SHARE,"volume-opt=o=addr=$NFS_SERVER,$NFS_OPTS",type=volume,volume-driver=local,volume-opt=type=nfs" busybox ls $NFS_LOCAL_MNT
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
bdbbaa22dec6: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:edafc0a0fb057813850d1ba44014914ca02d671ae247107ca70c94db686e7de6
Status: Downloaded newer image for library/busybox:latest
ERRO[0193] error waiting for container: Error response from daemon: Server error from portlayer: ContainerWaitHandler(3c6d0cdf98e44764bc982ec25133c16aaf4ff30ea151165a4d430eb6796fd769) Error: context deadline exceeded
docker: Error response from daemon: Server error from portlayer: unable to wait for process launch status: Post https://vcenter.domain.local/sdk: context deadline exceeded.
[burningsky@engal ~]$ docker --tls volume create --driver local --opt type=nfs --opt o=addr=$NFS_SERVER,$NFS_OPTS --opt device=:$NFS_SHARE $NFS_VOL_NAME
Error response from daemon: bad driver value - device is not a supported option
The text was updated successfully, but these errors were encountered: