portainer: Unable to mount an NFS volume
Bug description Ive got trouble with mounting an NFS share as a volume for a container. Strangely it worked once until a restart, but i was not able to repeat it.
Im running my Portainer on a VMWare Photon host.
One of the shared NFS folders on my OMV server is accessible from whole subnet and has full r/w access permissions for user “docker” with uid 1003.
I have set up Portainer to use NFS4 and added PUID=1003 to the containers runtime options, but whenever i want to create a container using the volume im getting an error:
error while mounting volume '/var/lib/docker/volumes/calibre-web-data/_data: failed to mount local volume: mount :/export/Ebooks:/var/lib/docker/volumes/calibre-web-data/_data, flags 0x400, data:addr=10.10.1.13, rsize=8192,wsize=8192,tcp,timeo=14: no such file or directory
When i run showmount -e 10.10.1.13 on the docker host i get:
/export/Ebooks 10.10.0.0/16
the share is mountable on both my desktop and docker host (manually).
~$ mount | grep Ebooks
10.10.1.13:/Ebooks on /DATA-OMV/Ebooks type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.10.10.10,local_lock=none,addr=10.10.1.13)
Here are my volume’s settings
Expected behavior Container should start with an NFS volume mounted
Portainer Logs No logs, as i cannot run the container.
Technical details:
- Portainer version: 1.23.2
- Docker version (managed by Portainer): Docker version 18.09.9, build 039a7df
- Platform (windows/linux): Linux r720-photon 4.19.115-1.ph3-esx #1-photon SMP Tue Apr 21 18:54:09 UTC 2020 x86_64 GNU/Linux
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (8 by maintainers)
I don’t think this is an error. I tried to get its working for +12h, did not under stand the problem.
But then i found a video from Portainer taking about “How-to: Use the Portainer volume browser feature” Last in this video he talks about NFS Volumes and Portainer. Then he mentions that the NFS volume is not mounted IF not the Volume is associated with a container AND it is running. As soon as the container stops the NFS are no longer mounted.
I went back to documentation and can’t find any thing about it, under “Volumes”. Had been nice if it had been mentions there, how it’s working. For I thought it was mounted the whole time, as soon I had created the volume with NFS mount.
So everything have been working right for me the hole time.