I've hit a wall with trying to figure this out. I'm running docker swarm on two nodes and I created an nfs volume to my synology.
Inside of the container:
root@container:/data# ls -ltr
drwxr-xr-x 4 root root 4096 Jun 24 22:59 unprocessed
which is missing directories. If I ssh into the host and check the docker mount there, I see this:
root@box:/var/lib/docker/volumes/vol_multimedia/_data# ls -ltr
total 4
drwxrwxrwx 1 1024 users 0 Sep 6 2021 images
drwxrwxrwx 1 1024 users 38 Dec 19 2021 unprocessed
drwxrwxrwx 1 1024 users 66 Apr 1 08:39 processed
-rwxrwxrwx 1 1026 users 41 May 29 23:21 multimedia-readme.txt
drwxrwxrwx 1 root root 36 Jun 3 22:47 '#recycle'
which is what I expect to see. Why would there only be a subset of files visible from within the docker container?
The docker command i used to create the volume is
docker volume create --driver local \
--opt type=nfs \
--opt o=addr=synology.local,rw,soft,nfsvers=4 \
--opt device=:/volume1/multimedia \
vol_multimedia
compose file looks like
version: "3.8"
services:
jellyfin:
# ... removed for brevity
volumes:
- type: volume
source: vol_multimedia
target: /data
# ... removed for brevity
volumes:
vol_multimedia:
external: true
UPDATE: What I had above seems to be misleading. The container which was bad was running on a different node of the same swarm. One node is correct but the other isn't. Very bizarre two nodes in the same swarm would behave differently.