docker
system_error
ai_generated
true
Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/...: invalid argument
ID: docker/overlay2-mount-invalid-argument
82%Fix Rate
88%Confidence
1Evidence
2023-11-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Docker 25.0.3 | active | — | — | — |
| Linux 6.1.0 | active | — | — | — |
| ext4 1.46.5 | active | — | — | — |
Root Cause
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.
generic中文
Docker 存储后端文件系统(如未启用 'overlay' 特性的 ext4 或缺少 'd_type' 支持的 XFS)不支持 overlay2 驱动要求。
Official Documentation
https://docs.docker.com/storage/storagedriver/overlayfs-driver/#prerequisitesWorkarounds
-
85% success Check filesystem support: run 'mount | grep overlay' and verify 'd_type' is enabled on XFS with 'xfs_info /var/lib/docker'. If missing, reformat the partition with 'mkfs.xfs -n ftype=1 /dev/sdX' (backup first).
Check filesystem support: run 'mount | grep overlay' and verify 'd_type' is enabled on XFS with 'xfs_info /var/lib/docker'. If missing, reformat the partition with 'mkfs.xfs -n ftype=1 /dev/sdX' (backup first).
-
70% success Switch to 'vfs' storage driver temporarily by adding '{"storage-driver":"vfs"}' to /etc/docker/daemon.json and restarting Docker. Note: VFS uses more disk space.
Switch to 'vfs' storage driver temporarily by adding '{"storage-driver":"vfs"}' to /etc/docker/daemon.json and restarting Docker. Note: VFS uses more disk space.
中文步骤
检查文件系统支持:运行 '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 会占用更多磁盘空间。
Dead Ends
Common approaches that don't work:
-
Reinstall Docker completely
90% fail
Reinstallation does not change the underlying filesystem configuration; the mount error persists.
-
Change storage driver to 'devicemapper' via daemon.json
60% fail
Devicemapper is deprecated and may cause other errors; also requires loop device setup.
-
Run 'docker system prune -a' to clean storage
75% fail
Pruning removes data but does not fix the filesystem incompatibility for new mounts.