One server for each data directory
Two protections make sure that only one server controls a set of resources.
ferryd A locks its data directory. It owns the containers with the prefix ferry.
The lock of the data directory
While it runs, ferryd holds an exclusive lock on <data-dir>/ferryd.lock. A second server with the same data directory refuses to start.
Error: another ferryd is already running with data directory /var/lib/ferryThe owner of the name prefix
All Docker resources of a server have its name prefix: --name-prefix, default ferry. One prefix has one data directory as its owner.
Error: Docker resources with prefix 'ferry' belong to another Ferry server (data dir /var/lib/ferry). Run this server with a different --name-prefix, stop the other server, or pass --take-over to adopt the resources (the other server's containers will then be managed — and possibly removed — by this one).--take-over
Use --take-over only if you want this server to control the resources. An example: you restored a data directory without its instance_id file.
The reconciler removes each container with its prefix that it sees as an orphan. Two servers with the same prefix would remove the containers of each other.
Ferry records the owner on a marker volume: <prefix>-owner.
- A server whose data directory does not own the prefix.
- A server with an empty data directory that finds containers with its prefix.
See Multiple servers.