Volume drivers and shared storage decisions
A volume driver connects Docker volumes to a storage implementation. The usual local driver serves a Docker host; a suitable external storage configuration can make data available across hosts. A driver does not automatically provide replication, safe concurrent writes or backups. Choose storage by the application’s access pattern and failure requirements.
Worked storage scenario
Use the synthetic scenario offline first. No real data, daemon changes, host mounts or production resources are required. Commands, if shown, are documented examples rather than observed output. Any real Docker check requires an approved disposable context. Keep the exercise offline. For any separately authorized Docker verification, identify the effective endpoint (including DOCKER_HOST and DOCKER_CONTEXT) before sending even read-only Engine requests. Record server version and platform; redact sensitive metadata.
Fictional workloadA: one host, private job outputB: two hosts, read-only shared catalogC: two database writers, same data directoryCandidate: local disk or approved remote file serviceFor A, a local named volume is a straightforward starting point. For B, a reviewed remote filesystem can serve the same catalog to both hosts, if availability, permissions, caching and update behavior meet requirements. Merely giving local volumes the same name on two hosts does not share their bytes. For C, do not point independent database servers at the same directory unless the database explicitly supports that architecture. Review locking, durability, network interruption, authentication, backup and latency. Docker volume creation accepts a driver and driver-specific options; the local driver can also mount remote filesystems with suitable options. A working configuration depends on the daemon host, not necessarily the CLI machine. A successful mount is only initial connectivity evidence. A review should also establish ownership, expected behavior during interruption and a recovery test against the intended data. Never use real mount credentials in the worksheet.
Common mistake
A remote storage mount is not high availability by itself. A shared server can still be a single point of failure; test the application’s behavior during loss of storage.
Manual practice
Choose storage for A and B, reject or redesign C, and list three checks before approving remote storage. Do not mount real remote filesystems in this exercise.
Worksheet: lab-fixtures/docker-storage-engineering/02-volume-drivers/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Volume drivers and shared storage decisions — Knowledge check
Reason about storage behavior and recovery evidence.
Two hosts have local volumes named catalog. What follows?
What is required before two database servers write the same directory?
Which failure should a remote-storage design examine?