FULL AI ANALYSIS

Docker containers report 'no space left on device' after systemd tmpfiles cleaned /var/lib/docker metadata despite free disk space

Generated Oct 27, 2026, 9:31:39 AM

Analysis summary

Tmpfiles cleanup targeting /var/lib/docker/tmp can remove files Docker expects at runtime or leave overlay metadata in inconsistent state; removing files inside Docker's storage directories risks orphaning references and creating many small metadata objects (or leaving dentry/inode gaps) causing inode exhaustion. The immediate cause of 'no space left' despite block space is inode exhaustion or overlay metadata inconsistency after pruning internal tmp dirs. Best fixes: exclude Docker data dirs from tmpfiles, schedule Docker-knowledgeable cleanup via docker system prune or use Docker GC tools, and recover by stopping Docker, repairing metadata, then restarting.

Possible causes

systemd-tmpfiles removed files under /var/lib/docker (tmp or metadata), causing overlayfs metadata inconsistencies or orphaned inodes leading to inode exhaustion

85%

High volume of container temp files previously created exhausted inode table; tmpfiles reduced free inodes by touching filesystem layout causing failure to reclaim inodes quickly

50%

Underlying filesystem corruption triggered by concurrent deletes and container overlay operations leading to transient ENOSPC until docker restart

30%

Docker storage driver bug accelerated by external cleanup of its internal directories

25%

Suggested fixes

1

Diagnostic step 1

Immediate recovery: stop Docker (systemctl stop docker), run fsck if suspected corruption (only on unmounted partition), restart Docker and run docker system prune -a --volumes to reclaim space safely.

2

Diagnostic step 2

Preventive: remove any tmpfiles.d rules that target /var/lib/docker or /var/lib/docker/tmp; create an explicit exclusion for Docker directories.

3

Diagnostic step 3

Use Docker-native cleanup: schedule docker system prune or use docker-gc instead of systemd-tmpfiles to remove docker artifacts.

4

Diagnostic step 4

Monitor inode usage (df -i) and set alerts; consider moving /var/lib/docker to a dedicated partition with appropriate inode settings if workload creates many small files.

5

Diagnostic step 5

If filesystem inconsistency persists, collect docker and kernel logs and escalate to Docker/OSS storage-driver community.