How do you replicate volumes?

Hello, I’m trying to learn how to use Docker Swarm and have a cluster with High Availability.

On Docker Swarm you can have replicated containers. If one node is off, the containers are up on another node BUT if a container needs a volume, those aren’t replicated. So basically you container is back up but with no data.

Some people like to use SMB or NFS but if the host is down you also lose data, so no HA.

I’m looking into replicating volumes between the nodes.

What software are you using to do that?

This is often a difficult decision even in Kubernetes, which is more actively developed and many new storage solutions are built only for that. There are volume plugins for Docker, but I never actually used them, especially not for Swarm

https://hub.docker.com/search?categories=Databases+%26+storage&type=plugin

I am not a Swarm user, so you can expect better answers later from Swarm users, but I guess you would need either something like GlusterFS (which supports replicas, but similar to NFS) or use S3. All of these would require network filesystems or downloading files through a rest api.

I also found an old answer from a Docker captain here: https://stackoverflow.com/a/47783308
I don’t know if the answer would be the same today, but Docker is focusing on development environments, not on Swarm, so I guess Swarm is still similar.

And now I leave this topic for more experienced Swarm users.

There used to be great solutions like StorageOS (now Ondat) or Portworx (both Cluster of storages) for Swarm, but they stopped supporting Swarm and focused on Kubernetes.

Viable options:

  • HA NFS - usually provided by enterprise grade storages or cloud providers
  • Gluster - Distributed store cluster. Engine Volume Plugins exist. Not sure how active maintained, last release was July 2025.
  • Ceph - , Distributed store cluster, Engine Volume Plugins exist. From what I heared it requires more resources than Gluster.

With Gluster and Ceph you will want to have at least a dedicated 10Gpbs dedicated network for the storage, better 40Gbps+, unless performance is irrelevant.

Here is a topic from the past Looking for storage in docker swarm. Things didn’t change for better since.