I was having trouble with Docker filling up my BtrFS. In an attempt to free up some space
Removed all docker containers and images
Removed all btrfs subvolumes (/var/lib/docker/btrfs/subvolumes), with btrfs subvolume delete.
Now when I try to build an image (which worked fine before), it fails. Looking for a subvolumne that does not exist.
=> [internal] load build definition from Dockerfile => => transferring dockerfile: 37B => [internal] load .dockerignore => => transferring context: 2B => resolve image config for docker.io/docker/dockerfile:1.0.0-experimental => CACHED docker-image://docker.io/docker/dockerfile:1.0.0-experimental@sha256:d2d402b6fa1dae752f8c688d72066a912d7042cc172 0.0s failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: failed to prepare gh2dey9aw54ody0d4huohfcvc: stat /var/lib/docker/btrfs/subvolumes/ffd9d6af83bc8c771c4eeb63fa57218386a5d8d0581c08a4f734baf0a8466f41: no such file or directory
Does anyone have a solution how I can fix this?
If I remove the experimental syntax I still get problem with missing subvolume, but a slightly different way.
failed to solve with frontend dockerfile.v0: failed to build LLB: failed to prepare jads1n0192ve0lvj52ue1940h: stat /var/lib/docker/btrfs/subvolumes/fa56d63b39b4fadf6a6c1af7515c29b9c3692827bc612a678a4ab485a223e91b: no such file or directory
Someone else also had this problem, but no solution
This line from the gist source I mentioned above comes to mind. When I first tried, I did try manually delete the subvolumes.
DO NOT USE THE
rmCOMMAND! This will not work, and if it does, you will have irreversibly corrupted your BTRFS system. Go immediately to the Drastic Actions section if you have accidentally done so.
Unfortunately I did. Perhaps I then have a irreversibly corrupted my BtrFS system.
I did a last attempt to clean my Docker setup.
Removed all docker images. Stopped docker. Deleted all BtrFS Docker subvolumes. Deleted the contents of /var/lib/docker. Started Docker daemon.
Now I can build again.