Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i use this with swarms? #197

Open
Mrs-Feathers opened this issue Oct 20, 2021 · 1 comment
Open

How can i use this with swarms? #197

Mrs-Feathers opened this issue Oct 20, 2021 · 1 comment

Comments

@Mrs-Feathers
Copy link

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?

@kpolucas
Copy link

kpolucas commented Jul 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants