# Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/...: invalid argument

- **ID:** `docker/overlay2-mount-invalid-argument`
- **Domain:** docker
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 82%

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

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Docker 25.0.3 | active | — | — |
| Linux 6.1.0 | active | — | — |
| ext4 1.46.5 | active | — | — |

## Workarounds

1. **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).** (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).
   ```
2. **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.** (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.
   ```

## Dead Ends

- **Reinstall Docker completely** — Reinstallation does not change the underlying filesystem configuration; the mount error persists. (90% fail)
- **Change storage driver to 'devicemapper' via daemon.json** — Devicemapper is deprecated and may cause other errors; also requires loop device setup. (60% fail)
- **Run 'docker system prune -a' to clean storage** — Pruning removes data but does not fix the filesystem incompatibility for new mounts. (75% fail)
