Interview's MateDocker
Interview's Mate

Docker

Compose · Networking · Security · Ops

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Docker topics
Lesson 53/ 160
03. Storage, Volumes & Data Persistence

Volume Drivers & Cloud/Network Storage Plugins (NFS, EBS)

Attach NFS, EBS, and other volume plugins when local disk is not enough.

AdvancedVolume Drivers · NFS3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Use a plugin when the workload needs storage placed or replicated independently of one Docker host.

Think of it like…

A plugin is a logistics company that connects your storage locker to a new terminal, but it also decides which truck may hold the key and how far it can travel.

Where you’ve seen it

In practice, docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs is the concrete move for this job: attach NFS, EBS, and other volume plugins when local disk is not enough. The release is not accepted until inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it confirms the result.

Words you’ll hear

Volume Drivers
The implementation control in docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs for attach NFS, EBS, and other volume plugins when local disk is not enough.
NFS
The result to observe with inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it, rather than infer from a successful command alone.
EBS
The production boundary exposed when attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability.

Visual diagram

Loading interactive diagram

Theory & deep dive

Volume Drivers control path

The concrete mechanism is docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs. The observable result is inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it; if those disagree, inspect the runtime evidence before changing unrelated settings.

Attach NFS, EBS, and other volume plugins when local disk is not enough. Keep Volume Drivers, NFS and EBS in the same deployment record so the intent and the observed state cannot drift apart.

Concrete Volume Drivers setup

docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs

Key takeaway: Prove NFS with inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it, not with command success alone.

EBS failure boundary

A volume driver does not turn EBS into multi-attach by magic, and NFS latency or root-squash can break application permissions. The orchestrator must reconnect and fence a volume so two active nodes do not write the same filesystem. The narrow failure to design for is attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability.

Accept this compromise explicitly: Cloud block drivers give strong per-volume performance and snapshots; network filesystems simplify sharing at the cost of latency and server failure domains. The controlled check-inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it-also identifies the point where a different design is safer.

Deliberate failure test

Exercise this failure safely: attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability.

Key takeaway: Cloud block drivers give strong per-volume performance and snapshots; network filesystems simplify sharing at the cost of latency and server failure domains.

How it works, step by step

Step 1 of 4
Design

1. State the boundary

Write down why the workload needs this: A volume driver does not turn EBS into multi-attach by magic, and NFS latency or root-squash can break application permissions. The orchestrator must reconnect and fence a volume so two active nodes do not write the same filesystem.

Use a plugin when the workload needs storage placed or replicated independently of one Docker host.
Key numbers at this step
Intent
Volume Drivers

When to use it & trade-offs

What it is

A Docker volume plugin maps driver calls to storage such as NFS, cloud block devices or distributed systems. Local path convenience is replaced by a plugin service, network identity, attachment semantics and topology limits such as “one node read/write” versus shared access.

Why it matters: A volume driver does not turn EBS into multi-attach by magic, and NFS latency or root-squash can break application permissions. The orchestrator must reconnect and fence a volume so two active nodes do not write the same filesystem.

When to reach for it

  • The fit is strongest for this job: attach NFS, EBS, and other volume plugins when local disk is not enough. Pair it with inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it in the runbook.
  • Production Volume Drivers changes should make NFS observable through docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs, rather than trusting the runtime default.
  • Keep a rollback example for the case where attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability.

When to avoid or be careful

  • Do not accept command success while the system can still fail by attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability.
  • Avoid erasing EBS protection merely to dodge this cost: “Cloud block drivers give strong per-volume performance and snapshots; network filesystems simplify sharing at the cost of latency and server failure domains”.
  • Do not replace the evidence path-inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it-with a screenshot or a mutable tag.

docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs: practical choices

Explicit Volume Drivers
Best for: Attach NFS, EBS, and other volume plugins when local disk is not enough, with a reviewed runbook.

Strengths: A Docker volume plugin maps driver calls to storage such as NFS, cloud block devices or distributed systems. Local path convenience is replaced by a plugin service, network identity, attachment semantics and topology limits such as “one node read/write” versus shared access.

Watch out: Cloud block drivers give strong per-volume performance and snapshots; network filesystems simplify sharing at the cost of latency and server failure domains.

Ambient default
Best for: Short-lived NFS experiments with low blast radius.

Strengths: It can begin with docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs and fewer surrounding controls.

Watch out: It silently accepts attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability, which makes the result hard to reproduce after promotion.

Managed EBS
Best for: Teams that centralize EBS policy across many workloads.

Strengths: A volume driver does not turn EBS into multi-attach by magic, and NFS latency or root-squash can break application permissions. The orchestrator must reconnect and fence a volume so two active nodes do not write the same filesystem.

Watch out: The platform adds an ownership and debugging layer; retain inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it as the direct check.

Interview signals & numbers to know

When this topic comes up

  • docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs
  • inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it
  • Failure signature: attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability
  • Trade-off: Cloud block drivers give strong per-volume performance and snapshots; network filesystems simplify sharing at the cost of latency and server failure domains.

Benchmarks & rules of thumb

NFS 4.1 -
common network filesystem protocol version
RWO -
read-write-once attachment mode often used for block storage
2 failure planes -
Docker host and external storage control path

Common mistakes & follow-ups

Common interview mistakes

  • Treating a successful docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs as proof and skipping inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it.
  • Attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability
  • Optimizing Volume Drivers without accepting that cloud block drivers give strong per-volume performance and snapshots; network filesystems simplify sharing at the cost of latency and server failure domains.

Likely interviewer follow-ups

  • Why does docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs address Volume Drivers here rather than through application code?
  • How would you distinguish healthy NFS from the failure “attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability” using inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it?
  • When would this trade-off-“Cloud block drivers give strong per-volume performance and snapshots; network filesystems simplify sharing at the cost of latency and server failure domains”-justify a different EBS design?
Interview tip: Give one concrete operation-docker plugin ls; docker volume create --driver local --opt type=nfs --opt o=addr=10.20.0.8,rw,nfsvers=4.1 --opt device=:/exports/shop shop-nfs-and one proof-inspect plugin health, mount.nfs negotiation, volume scope and a forced reconnect from a second host only if the driver supports it. Then name the boundary: attaching a single-node block volume to two active writers, or depending on NFS without monitoring path latency and server availability.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Volume Drivers & Cloud/Network Storage Plugins (NFS, EBS) with generative AI interview Q&A and hands-on practice.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
Backing Up, Restoring & Migrating Docker Volumes
Next topic
File Permissions & UID/GID Mismatches in Mounted Volumes