Volume plugins should not write data to the /var/lib/docker/ directory, including /var/lib/docker/volumes . The /var/lib/docker/ directory is reserved for Docker.
I thought that data were persisted, in the event of a volume binding, precisely in this directory, in
/var/lib/docker/volumes/the_volume_I_created
This note is for Volume plugins, not for docker’s default volume driver (local). The default storage is on /var/lib/docker/volumes but if you install plugin like hectorqin/local-mapping, vieux/sshfs or trajano/nfs-volume-plugin, he will mount respectively from another directory, a remote ssh folder and from a NFS disk.
To resume, if you create a volume like following:
docker volume create test-vol
you’ll see the folder on /var/lib/docker/volumes/test-vol but if you create a volume using a driver plugin like following