Docker (Swarm) Volume problem with NFS

It was unfortunately not the inconsistency that is the problem.

I tried to remove the docker installation from snap and followed the guide you linked to. Now it’s installed via apt and the apt repository in the official docker guide.

I experience the same issue.

I did the following:

  • Try with exact same swarm setup on the apt installation as I did with the snap installation.
  • Removed all worker nodes, so there’s only the manager.
  • Tried with both the nfs4 and nfs option.

None of it worked. :frowning:

I ran the following:

docker volume create --driver local --name portainer --opt type=nfs4 --opt device=:/volume1/docker_volumes/portainer --opt o=addr=192.168.10.4,rw,nolock

And got the following in the inspect:

$ docker volume inspect portainer 
[
{
    "CreatedAt": "2020-12-06T21:49:42+01:00",
    "Driver": "local",
    "Labels": {},
    "Mountpoint": "/var/lib/docker/volumes/portainer/_data",
    "Name": "portainer",
    "Options": {
        "device": ":/volume1/docker_volumes/portainer",
        "o": "addr=192.168.10.4,rw,nolock",
        "type": "nfs4"
    },
    "Scope": "local"
}
]

I still see an empty directory here:

$ sudo ls -la /var/lib/docker/volumes/portainer/_data
total 8
drwxr-xr-x 2 root root 4096 Dec 6 21:49 .
drwxr-xr-x 3 root root 4096 Dec 6 21:49 ..

Could there be anything I haven’t installed? I followed the official installation guide.

Shouldn’t I be able to see the content of the NFS share in the directory /var/lib/docker/volumes/portainer/_data ?