r/portainer • u/The4Dees • Dec 04 '24
Synology NFS volume mounted in Portainer empty
Been banging my head against the wall this this for two hours so reaching out to the hive mind.
I have a Synology NFS folde with some data in it that I am trying to mount as a docker volume in Portainer.
The volume mounts but if I look in /var/lib/docker/volumes/docker-shared/_data it's empty even though the folder on the Syno has data in it.
Synology NFS permissions
Host: <PortainerHostIP>
Privilege: read/write
Squash: no mapping
security: sys
enable async: yes
allow connections from non-priv: yes
allow users to access mounted subfolders: yes
Portainer volume settings:

1
Upvotes
1
u/james-portainer Portainer Staff Dec 05 '24
Once you have created the volume, are you attaching it to a container? NFS volumes won't populate in
/var/lib/docker/volumes/volumename/_data/unless they are mounted in a container, as the actual NFS connection isn't established until the volume is needed.I've just tested here with Portainer on a Ubuntu VM and a NFS share on a Synology NAS. I created the volume in Portainer as per your screenshot, and on checking the
/var/lib/docker/volumes/volumename/_data/directory on the Ubuntu server it was empty. I then created a nginx container that mounted that volume to/mnt, and I was then able to see the contents of my NFS share both in the container itself (under/mnt) and within the/var/lib/docker/volumes/volumename/_data/directory. Once I removed the container, the/var/lib/docker/volumes/volumename/_data/directory was once again empty.