docker resource_error ai_generated true

Error response from daemon: write /var/lib/docker/overlay2/.../merged: no space left on device

ID: docker/overlay2-disk-full

Also available as: JSON · Markdown · 中文
85%Fix Rate
87%Confidence
1Evidence
2023-09-10First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
Docker 24.0.6 active
Docker 25.0.0 active
Docker 20.10.24 active

Root Cause

The filesystem where Docker stores overlay2 layers (usually /var/lib/docker) has run out of disk space.

generic

中文

Docker 存储 overlay2 层的文件系统(通常为 /var/lib/docker)磁盘空间已满。

Official Documentation

https://docs.docker.com/config/pruning/

Workarounds

  1. 85% success Free up space: run 'docker system prune -a --volumes' to remove all unused images, containers, and volumes. Then check disk usage with 'df -h /var/lib/docker'.
    Free up space: run 'docker system prune -a --volumes' to remove all unused images, containers, and volumes. Then check disk usage with 'df -h /var/lib/docker'.
  2. 90% success Increase disk space by adding a new storage device and moving Docker's data directory: edit /etc/docker/daemon.json with 'data-root': '/new/path', then restart Docker.
    Increase disk space by adding a new storage device and moving Docker's data directory: edit /etc/docker/daemon.json with 'data-root': '/new/path', then restart Docker.

中文步骤

  1. Free up space: run 'docker system prune -a --volumes' to remove all unused images, containers, and volumes. Then check disk usage with 'df -h /var/lib/docker'.
  2. Increase disk space by adding a new storage device and moving Docker's data directory: edit /etc/docker/daemon.json with 'data-root': '/new/path', then restart Docker.

Dead Ends

Common approaches that don't work:

  1. 70% fail

    Running 'docker system prune' only removes unused containers and images, but may not free enough space if the volume is too small.

  2. 95% fail

    Restarting the Docker daemon does not free disk space; it only clears temporary locks.