Any Good Docker Swarm Persistent Storage Solution

I’m doing Docker Swarm on 3 DO Droplets, all good. Everything works fine.

But I got reminded that from my previous setup I use bind mount. And on Docker Swarm as far as I understand, each replica will have “it’s own” data on the node its running, It will not be shared to the other nodes.

So is there any good solution?

Thanks.

Some use glusterfs for that. It itself can be run in containers and share files as so called bricks. With it is will be truly HA storage as it replicates all the data at least 2 times. When a node goes down the others will chug along. If you don’t want to pay twice as much for storage you could just use nfsv4 (don’t use v3 as it doesn’t support locking) as well but that comes with its own problems, but is easier to set up.

But why not use try out Kuberntes as Docker Swarm is on its last legs and k8s just rulez. Setting up k3s is as easy and can be used with 3 Controlplanes that also allows you to run workloads. Might be worthwhile :wink: There’s even a tool to convert docker-compose stacks to it, but it should just be used as a guideline.