New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
orphaned diffs #22207
Comments
|
I should also show that docker lists no containers, volumes, or images:
|
strange; especially because of;
which doesn't match the output of What operating system are you running on?
@tonistiigi any idea? |
That was afterward. I guess some processes kicked off in the meantime. The state I'm referring to (I have now) is:
And I still have:
|
We're on Ubuntu Lucid with an upgraded kernel =/
|
It seems an interesting issue. |
Surely it's possible, but I don't know how.
|
One possible way I see this happening is that if there are errors on aufs unmounting. For example, if there are EBUSY errors then probably the image configuration has already been deleted before. @bukzor Would be very interesting if there was a reproducer that would start from an empty graph directory, pull/run images and get it into a state where it doesn't fully clean up after running your script. |
That would be interesting, but sounds like a full day's work. Here's some more data regarding the (arbitrarily selected) troublesome diff above,
So we see there's a chain of child layers, with
So that layer was used in mount
Is there any way to find what container that mount was used for? |
@tonistiigi OK. Then obviously the mount has outlived its container. At what point in the container lifecycle is the mount cleaned up? |
@bukzor (rw) mount is deleted on container deletion. Unmount happens on container process stop. Diff folders are a place where the individual layer contents are stored, it doesn't matter is the layer is mounted or not. |
@bukzor The link between the aufs id and container id can be found at |
Running into similar issue. We're running daily CI in the docker daemon server. /var/lib/docker/aufs/diff takes quite a mount of disk capacity, which it shouldn't be. |
Still |
Short of a proper fix, is there any straightforward way of removing the leftover mounts without removing all other images at the same time? (If no containers are running currently, I guess there should be no mounts, right?) |
I am experiencing the same issue. I am using this machine to test a lot of containers, then commit/delete. My /var/lib/docker/aufs directory is currently 7.9G heavy. I'm going to have to move this directory to another mount point, because storage on this one is limited. :( |
|
@mcallaway Everything in |
I have the same issue. All containers which I have are in running state, but there are lots of aufs diff directories which don't relate to these containers and relate to old removed containers. I can remove them manually, but it is not an option. There should be a reason for such a behavior. I use k8s 1.3.5 and docker 1.12. |
Running of the |
I have the same issue. I'm using Gitlab CI with dind (docker in docker). |
IMHO when image in the registry was updated within the same tag and it was pulled, then related container was restarted, old container and image are not GCed unless you run Can someone else confirm this? |
@kayrus correct, docker will not automatically assume that an "untagged" image should also be removed. Containers could still be using that image, and you can still start new containers from that image (referencing it by its ID). You can remove "dangling" images using |
@thaJeztah does |
@kayrus yes they are part of the images (tagged, and untagged) |
getting a similar issue, no containers/images/volumes, ~13Gb of diffs
|
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 1.12.0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: xfs
Dirs: 1122 Same issue here. I understand 1.13 may get data management commands but in the meantime, I just want to safely delete the contents of this directory without killing Docker. This is relatively blocking at this point. |
Yes, docker will not clean up old orphaned dirs yet. |
By old you mean those created from a previous version of docker with this issue? This is a fresh install of Docker we did about two weeks ago, those orphans must have been created since then, so it seems that docker must still be creating those orphans? I mean, in the last half an hour I've got
You said "17.06 should no longer create orphaned diffs, but it won't clean up the old ones yet.", but surely this cannot be correct, or am I missing something? Are those tagged with |
@orf On a newer kernel, it's highly unexpected to have any issue at all during removal. Are you mounting I'll check in the aufs driver to see if there's a specific issue there with it reporting a successful remove when it really wasn't. |
We are not mounting
We are running 14.04 LTS Let me know if there is anything I can provide to help debug this. |
For other reasons (swarm mode networking) I moved off 14.04 for Docker
machines.
…On Mon, Aug 21, 2017 at 8:23 AM orf ***@***.***> wrote:
We are not mounting /var/lib/docker into a container.
$ uname -a
Linux gitlab-cirunner 4.4.0-83-generic #106~14.04.1-Ubuntu SMP Mon Jun 26 18:10:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
We are running 14.04 LTS
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#22207 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADRIfE2B2HNpbsKyTOj1CwGzulRT2C0ks5saaDPgaJpZM4IMGt2>
.
|
This appears to be worse with 17.06.01-ce. I updated a build machine to this version and immediately started seeing the |
@mmanderson Thanks for reporting. Taking a look at changes in the AUFS driver. |
@mmanderson Do you have any containers in the |
issue-22207.txt
|
@erikh is this the issue you are experiencing? |
@cpuguy83 After uninstalling 17.06.01-ce, removing the /var/lib/docker directory and installing 17.06.0-ce I try to run the same build. The build fails because of the |
Thanks all, this is a regression in 17.06.1... |
Thank you so much @Karreg for your excellent script. After getting rid of all the old ophaned diffs and freeing huge amounts of lost disk space again we are using it now regularily to clean our VMs before installing new docker images. Great help and an almost perfect workaround for this issue now. @TP75 |
Looks like Docker, Inc. have some contracts with computer data storage manufacturers. |
@Karreg's script worked fine for me and I freed all the space in the diffs directory. |
Having the same issue. root@UbuntuCont:~# docker info root@UbuntuCont:/var/lib/docker/aufs/diff# ls |
@kasunsjc please read the posts just above yours. |
I confirm upgrading to 17.06.2-ce solved this issue. I didn't have to manually the directories either (last time) after the upgrade. |
17.06.2-ce appears to have fixed this for me as well. No more I'm assuming that the |
Updating to 17.07.0 solved the issue here too, not even |
Confirming this issue was resolved on Ubuntu 16.04 with 17.06.2-ce. As soon as it was updated, the space cleared. |
resolves annoying disk space eater "-removing" regression with aufs/diff moby/moby#34587 moby/moby#21925 (comment) https://stackoverflow.com/a/45798794 moby/moby#22207
Let me close this issue, as the original issue looks to be resolved |
I'd like to know why docker uses so much disk, even after removing all containers, images, and volumes.
It looks like this "diff" has a layer, but the layer isn't referenced by anything at all.
The text was updated successfully, but these errors were encountered: