I want to test docker in Swarm mode.
I've created 3 Ubuntu-server Virtual Machines.
On each VM I've installed docker.
The next step that I would like to accomplish is to share the /var/lib/docker/volumes folder among the 3 docker nodes.
The first solution I tried is to mount /var/lib/docker/volumes as a remote sshfs volume. I failed because when the docker service starts it executes the command chown on the /var/lib/docker/volumes and it fails.
Then I tried to use glusterfs, I succeded to configure gluster to share the same folder on the 3 nodes (now if I create a file in /var/lib/docker/volumes on the first node, I can see the new file also on the others 2 nodes).
Then I started docker on the first node without any problem. But If I try to start docker on the second node I got the error:
Error starting daemon: error while opening volume store metadata database: timeout
I assume that the error is because the first node acquire the lock on the file /var/lib/doceker/meradata.db
How can I solve this problem? Is there an alternative to use glusterfs to share the docker volumes folder?
Thank you