2

I'm just learning how to use CoreOS and already ran into the first problem that really keeps bothering me: When using fleetctl to start and manage units, I learned that a unit is moved automatically to another machine, when the machine chosen to run the unit reboots or becomes unreachable to the cluster for another reason. Imagine now a situation when you have a unit running a Docker container that has access to a certain directory (via a Docker volume) present only on a specific machine.

What happens if the unit running this container is moved to another machine? I suppose the unit will fail since the directory that is supposed to be mounted as a Docker volume is not present on the new machine. Does this actually happen? And how could I circumvent this problem? Generally, how can I persist working data used by a docker container under the circumstances of auto-migrating containers?

3

I guess for now it's your responsibility to make sure data is available. You might want to check https://github.com/ClusterHQ/flocker which is specifically designed to take care to take data along with docker containers. I think it relies on ZFS features which may rule out its usage on CoreOS. The only alternative I could come up with is using a highly available external volume mounted on CoreOS.

  • Thanks for mentioning flocker. I did some reading in the documentation of this project and it seems to be the solution I'm looking for. Edit: I just found another question that seems to be very similar to my question asked here. This might be useful to other people digging up this answer: stackoverflow.com/questions/25360397/… – Ignatius Tremor Sep 24 '14 at 17:16
0

You can consider to run some distributed filesystem over CoreOS cluster. This way whatever machine your database service container ends on, it will always be able to use database, mounted from DFS.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.