š³ Introduction
Docker uses storage drivers to manage the image layers and the container writable layer, which together form the root filesystem of a container. Each storage driver comes with its own performance profile, compatibility, and operational characteristics.
Choosing the right storage driver affects:
- Disk performance
- Startup time
- Copy-on-write efficiency
- Snapshot and rollback capabilities
- Scalability
Letās explore all the storage drivers Docker has supported ā past and present ā along with their benefits, limitations, and preferred use cases.
š§± What Are Docker Storage Drivers?
A Docker storage driver is a backend mechanism that implements Dockerās layered filesystem model:
- Image layers = read-only
- Container layer = writable
- Floating union filesystem = combined view via mount
Docker abstracts this using different drivers based on the host OS and storage type.
š List of Docker Storage Drivers
| Driver | Supported OS | Status | Type |
|---|---|---|---|
| overlay2 | Linux | Recommended | Copy-on-write |
| overlay | Linux | Legacy | Copy-on-write |
| aufs | Linux | Deprecated | Copy-on-write |
| devicemapper | Linux | Deprecated | Block-based |
| btrfs | Linux | Niche | CoW filesystem |
| zfs | Linux | Niche | CoW filesystem |
| vfs | Linux | Internal/test | Full copy |
| overlayfs (containerd) | Linux | Latest | Snapshotter |
š§ 1. overlay2 (Preferred)
Type: Union filesystem on overlayfs
Availability: Linux Kernel >= 4.0
Status: Default and recommended driver
āļø Pros:
- Fast startup
- Low overhead
- Modern and actively maintained
- Scales well with many layers
- Wide kernel support
ā Cons:
- Struggles with heavy file delete/create operations
- Issues with certain kernel bugs (older distros)
š¦ Use Cases:
- CI/CD, Kubernetes, Docker Swarm, general Linux workloads
š¦ 2. overlay (Legacy)
Type: Earlier version of overlay2
Availability: Linux Kernel >= 3.18
Status: Deprecated in favor of overlay2
š Notes:
- Lower performance than overlay2 due to single-dir merge
- Only use on very old distros without overlay2 support
š 3. aufs (Advanced Multi-Layered Unification FS)
Type: Union filesystem
Availability: Ubuntu before 18.10
Status: Deprecated
āļø Pros:
- Original filesystem for Docker
- Supports many layers
ā Cons:
- No longer maintained in kernel
- Replaced by overlay2
š¦ Use Cases:
- Older Ubuntu systems, legacy infrastructure
š§± 4. devicemapper
Type: Block-level driver (thin provisioning)
Availability: RedHat, CentOS
Status: Deprecated
āļø Pros:
- Snapshot capability
- Useful for high-scale, block-device orchestration (back in the day)
ā Cons:
- Hard to configure (loopback by default is slow)
- Poor performance compared to overlay2
š¦ Use Cases:
- Legacy RHEL/CentOS installations
š³ 5. btrfs
Type: CoW filesystem, subvolumes
Availability: Linux (with btrfs volume)
Status: Supported but niche
āļø Pros:
- Snapshotting built-in
- Very efficient for layered FS
- Native features like deduplication
ā Cons:
- btrfs can be unstable in some configurations
- Requires dedicated filesystem
š¦ Use Cases:
- Environments that already use btrfs (e.g. SuSE)
šæ 6. zfs
Type: CoW filesystem
Availability: Linux & Solaris (ZFS installed)
Status: Supported but niche
āļø Pros:
- Robust, enterprise-grade
- Snapshots, compression, deduplication
ā Cons:
- More memory usage
- Not native to Linux kernel
- Not trivial to deploy
š¦ Use Cases:
- Enterprise-grade persistent data handling
š§Ŗ 7. vfs
Type: Copy full files/directories
Status: Not for production
āļø Pros:
- Portable
- Very simple
ā Cons:
- No layer sharing
- Extremely slow
- Consumes huge amounts of disk
š¦ Use Cases:
- Only for testing, debugging, or when CoW is unsupported
š 8. overlayfs (via containerd snapshotter)
Type: Snapshot-based storage via containerd
Availability: Docker 29+, containerd installs
Status: New default for fresh Docker installs
āļø Pros:
- Efficient, modern, Kubernetes-aligned
- Compatible with lazy loading, OCI image standards
ā Cons:
- Requires new tooling (
ctr,nerdctl) - Different layer paths under
/var/lib/containerd/...
š¦ Use Cases:
- Docker Engine v29+, Kubernetes nodes, containerd-managed runtimes
š§ How to Choose the Right Storage Driver
| Environment | Recommended Driver |
|---|---|
| Modern Linux (kernel >= 4.0) | overlay2 |
| Docker 29+ (fresh install) | containerd overlayfs snapshotter |
| Old Ubuntu kernels | aufs or overlay |
| Devices with btrfs or zfs pre-installed | btrfs or zfs |
| Embedded systems | vfs |
| Kubernetes | overlayfs (via containerd) |
š ļø Check Which Storage Driver Is In Use
docker info | grep "Storage Driver"
Code language: JavaScript (javascript)
āļø Advanced: Check Containerd Snapshot Layers
ctr -n moby snapshots ls
ls /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/<id>/fs
Code language: JavaScript (javascript)
š Conclusion
Docker Storage Drivers have evolved from layered union filesystems like AUFS to state-of-the-art containerd-backed snapshotters. Understanding which driver you’re running ā and whether it’s optimized for your workload ā is key to Docker stability and performance.
š For modern deployments, overlay2 (or containerd snapshotters in v29+) is the gold standard.
Iām a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at WIZBRAND