Juan Jimenez
Juan Jimenez

Reputation: 501

Docker persistent storage across hosts?

I am working on a Vagrantfile to set up a cluster of 3 Ubuntu 16.04 hosts for dev with Docker. Two of the requirements are:

I'm not an expert on Docker persistent storage across hosts. The first requirement is easy, I use the VirtualBox provider and createHD to create two VDI's per host if they don't already exist and then storageAttach to make them visible on the host. If they are new I mkfs.ext4 (or ??? I'm open to using other filesystems), create mount points and mount. Done.

The second requirement is the one that is kicking my butt. I know how to create volumes for attachment to containers, but across hosts? I looked at a few storage plugins but the only one I found that supported multihost is Flocker and it's dead as a doorknob -- the company folded and the Github project hasn't been touched since last year.

If would be great if someone could point me to a plugin with clear instructions on how to set it up, or to another solution? Short of setting up a fourth host with two HD's and using NFS to share across the other three hosts, I'm not sure what to do here.

Upvotes: 3

Views: 816

Answers (3)

Eugen Mayer
Eugen Mayer

Reputation: 9906

I would throw in portworx and something really promising is longhorn

Upvotes: 1

Juan Jimenez
Juan Jimenez

Reputation: 501

Well, in this case the problem is that the correct instructions were lost in translation. There was no requirement to connect the persistent storage across hosts, I was only expected to create persistent storage in each host, two volumes that could then be used by containers. Once I got that clarification, I realized I had already completed the requirement.

From my search I also realized there isn't really any good way to connect persistent local volumes across hosts for use by Docker containers in a high availability configuration, not without getting into a lot of complexity that defeats the purpose.

Upvotes: 0

Bastien
Bastien

Reputation: 1013

You could give a try to Minio and then use a s3 volume driver like docker s3 or minfs

Upvotes: 1

Related Questions