FULL AI ANALYSIS

Docker image pulls fail with 'no space left on device' though df shows plenty of disk — overlayfs inode exhaustion on Ubuntu 22.04

Generated Oct 24, 2026, 9:21:01 AM

Analysis summary

Error is due to running out of inodes on ext4: many small files from overlay2 consume inodes even if byte space remains. Temporary cleanup helps but recurrence is expected on churny CI. Long-term solutions: reformatting to a FS with more inodes (mkfs.ext4 with higher -i or use XFS), reduce layer/file churn by using slimmer images and build caches, or move Docker graph root to a separate partition with larger inode capacity.

Possible causes

Ext4 filesystem inode exhaustion on partition hosting /var/lib/docker due to many small files created by overlay2

95%

Overlay2 leak where deleted files remain due to running containers or lingering mounts preventing inode reclamation

40%

Daemon or orchestration bug repeatedly writing tiny metadata files (rare Docker bug or garbage collector misbehavior)

15%

Suggested fixes

1

Diagnostic step 1

Confirm inode exhaustion: df -i /var/lib/docker and ls -lah /var/lib/docker/overlay2 | wc -l to estimate entries.

2

Diagnostic step 2

Short-term: schedule maintenance window, stop docker.service, move /var/lib/docker to a larger partition (rsync -a), update /etc/docker/daemon.json {"data-root":"/mnt/docker"}, restart daemon. Verify by docker pull.

3

Diagnostic step 3

Medium-term: rebuild filesystem with larger inode density (mkfs.ext4 -i smaller_bytes_per_inode) or migrate to XFS on a new partition. Test on a non-prod runner first.

4

Diagnostic step 4

Reduce churn: use slimmer base images, multi-stage builds, and shared build cache (registry) to avoid frequent full-layer pulls.

5

Diagnostic step 5

Automate periodic pruning of unused images and containers and monitor inode usage with alerts.