Docker Community Forums

Share and learn in the Docker community.

Usage of USB devices in a swarm



I have a project in mind and would like to get your opinion on it.

I would like to build a docker swarm with two raspberry pi and I have an external HDD which contains data which should be accessible on both swarm nodes.

  1. Question: If I connect the HDD to the USB port of one pi, how do I define a volume for the container because I do not know on which node it will start.

  2. Question: How about the system load? In case I connect the HDD to node 1 and the container is running on node 2, I do have load on both nodes as data flow goes from HDD through node 1 to node 2, right? Is there any best practice available to manage this?