A bloated Unraid Docker image traced to leftover btrfs subvolumes
Claude found that Docker's switch to overlay2 had left 897 unused btrfs subvolumes, about 33 GB that du couldn't see. Clearing them cut the vDisk from 82% to 31% full.
Credits
- Reddit poster rogerdodger77 Source ↗
Earliest dated source:
The full story
An Unraid user's 90 GiB docker.img was 82% full, with 71 GB used, although the real images, volumes and containers only added up to about 27 GB. Claude worked out where the rest was: inside /var/lib/docker/btrfs/subvolumes, which du can't see into, so it only showed up with btrfs subvolume list.
When Docker moved from its old btrfs storage driver to overlay2, it left behind 897 unused subvolumes holding about 33 GB. The maker stopped all 27 containers, deleted the subvolumes with no failures, restarted the databases first and then pruned old build cache, volumes and images. The image dropped to 31% full with no resize, and was still fine a week later.
How it was done
Tools
Themes
Loading themes…
Sources
From a short post by the maker, so the details are as they tell them.
- Reddit: dramatically lowered my vdisk docker usageReddit poster: rogerdodger77Posted
The maker's write-up in r/unRAID, with the diagnosis and cleanup steps.