docker
system_error
ai_generated
true
来自守护进程的错误响应:创建 overlay 挂载到 /var/lib/docker/overlay2/... 时出错:无效参数
Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/...: invalid argument
ID: docker/overlay2-mount-invalid-argument
82%修复率
88%置信度
1证据数
2023-11-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Docker 25.0.3 | active | — | — | — |
| Linux 6.1.0 | active | — | — | — |
| ext4 1.46.5 | active | — | — | — |
根因分析
Docker 存储后端文件系统(如未启用 'overlay' 特性的 ext4 或缺少 'd_type' 支持的 XFS)不支持 overlay2 驱动要求。
English
The filesystem backing Docker's storage (e.g., ext4 without 'overlay' feature or XFS without 'd_type' support) does not support the overlay2 driver requirements.
官方文档
https://docs.docker.com/storage/storagedriver/overlayfs-driver/#prerequisites解决方案
-
检查文件系统支持:运行 'mount | grep overlay',并在 XFS 上使用 'xfs_info /var/lib/docker' 验证 'd_type' 是否启用。如果缺失,使用 'mkfs.xfs -n ftype=1 /dev/sdX' 重新格式化分区(需先备份)。
-
临时切换到 'vfs' 存储驱动,在 /etc/docker/daemon.json 中添加 '{"storage-driver":"vfs"}' 并重启 Docker。注意:VFS 会占用更多磁盘空间。
无效尝试
常见但无效的做法:
-
Reinstall Docker completely
90% 失败
Reinstallation does not change the underlying filesystem configuration; the mount error persists.
-
Change storage driver to 'devicemapper' via daemon.json
60% 失败
Devicemapper is deprecated and may cause other errors; also requires loop device setup.
-
Run 'docker system prune -a' to clean storage
75% 失败
Pruning removes data but does not fix the filesystem incompatibility for new mounts.