# 守护进程错误响应：写入 /var/lib/docker/overlay2/.../merged: 设备上没有空间

- **ID:** `docker/overlay2-disk-full`
- **领域:** docker
- **类别:** resource_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

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

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Docker 24.0.6 | active | — | — |
| Docker 25.0.0 | active | — | — |
| Docker 20.10.24 | active | — | — |

## 解决方案

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.
   ```

## 无效尝试

- **** — Running 'docker system prune' only removes unused containers and images, but may not free enough space if the volume is too small. (70% 失败率)
- **** — Restarting the Docker daemon does not free disk space; it only clears temporary locks. (95% 失败率)
