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?