docker-volume-netshare icon indicating copy to clipboard operation
docker-volume-netshare copied to clipboard

How can i use this with swarms?

Open Mrs-Feathers opened this issue 3 years ago • 1 comments

after creating a container using this driver as the volume driver in the swarm, if it migrates to another host, it cannot read anymore from the volume. how can i make it sync across the swarm? how can i make this driver the default volume driver?

Mrs-Feathers avatar Oct 20 '21 16:10 Mrs-Feathers

IDK if this is the way, im only sharing my experience in swarm.
Install the plugin on every node.
change the yml of the deploy for something like this

volumes:
  nginx.vol:
    driver: nfs
    driver_opts:
      share: 1.1.1.1:/path_nfs_server

And profit!

Also idk if this is a bug but when i try to mount an empty directory got failed to chown /var/lib/docker/volumes/MYVOLUME/_data: lchown /var/lib/docker/volumes/MYVOLUME/_data: operation not permitted
Even when the nfs-server permissions are fine

My workaround, just mount a directory with some files.

kpolucas avatar Jul 03 '22 14:07 kpolucas