8.2.3.2 Remote Volume Drivers
A focused guide to Remote Volume Drivers, connecting core concepts with practical Docker and container operations.
Remote volume drivers extend Docker's volume abstraction to storage backends located outside the local host entirely — networked filesystems, distributed storage systems — enabling volumes whose data can be accessed consistently regardless of which specific host in a cluster a container happens to run on.
Installing and Using a Remote Volume Driver
A remote volume driver is typically installed as a Docker plugin, after which volumes can be created using it just like any other driver.
docker plugin install some-nfs-driver
docker volume create --driver some-nfs-driver --opt server=nfs.example.com --opt share=/exports/data nfs-volume
Why Remote Drivers Matter for Multi-Host Deployments
In a cluster where a service's replicas might be scheduled on any of several hosts, a remote volume driver ensures each replica can access the same underlying data regardless of which specific host it lands on, something the local driver alone cannot provide.
docker service create --name app --mount type=volume,source=nfs-volume,target=/data --replicas 3 myapp:1.0
Each of the three replicas, potentially running on entirely different hosts, can access the identical underlying data through this remote volume driver.
Trade-offs Compared to Local Storage
Remote storage typically introduces additional latency compared to local disk access, and depends on the reliability of the underlying network and remote storage system — a trade-off that's often worthwhile for the multi-host accessibility it provides, but one worth being aware of.
docker run --rm -v nfs-volume:/data alpine dd if=/dev/zero of=/data/test bs=1M count=100
Measuring actual performance characteristics for a specific remote storage backend helps set realistic expectations before relying on it for performance-sensitive workloads.
Why Remote Volume Drivers Matter
For genuinely multi-host deployments needing consistent, shared access to the same data regardless of scheduling, remote volume drivers provide a necessary capability beyond what local, single-host storage can offer, extending Docker's volume model to support these more demanding deployment scenarios.