0

I'm using docker-dind inside my openshift.

I'm running against an issue related with no enought disk space. It means that docker is getting me:

Error starting daemon: Unable to get the TempDir under /var/lib/docker: mkdir /var/lib/docker/tmp: no space left on device

After that I've check this disk space, and I've increased the requested space for my volume to 150GiB.

I've got the free space available again on /var/lib/docker using df and it's getting that:

Filesystem                           Size      Used       Available  Used% Mounted on
10.49.160.20:vol_54e09e45168fdd5c... 149.9G    100.0G     49.9G      67%   /var/lib/docker

As you can see there's enoguh disk space now.

Any ideas? Remember that I'm not able to run any docker command since docker daemon is not started.

Also, I've tested where disk space is allocated. I've seen that /var/lib/docker/vfs/dir conains a bunch of directories:

$ ls /var/lib/docker/vfs/dir | wc -l
653
$ du -hs *
72.6M   0077b9a043252d5db88fe8abe13af933fd0ac915b9d5af4d4102b1cfc652d40d
72.6M   0077b9a043252d5db88fe8abe13af933fd0ac915b9d5af4d4102b1cfc652d40d-init
209.2M  0161adde630e2a544e130f73cfda10cd80c8c7e5cdd9668bc22faaff3da6076a
210.3M  0161adde630e2a544e130f73cfda10cd80c8c7e5cdd9668bc22faaff3da6076a-init
....
David Maze
  • 130,717
  • 29
  • 175
  • 215
Jordi
  • 20,868
  • 39
  • 149
  • 333
  • Your question is not clear. Are you getting the disk space error even after increasing the disk space? – Shashank V Jan 08 '20 at 15:57
  • Yes, it is. This is the issue. – Jordi Jan 08 '20 at 16:02
  • Are there also any permission-related errors? Is the container running as `privileged`? See also [scc](https://docs.openshift.com/container-platform/3.11/architecture/additional_concepts/authorization.html#security-context-constraints)? – gears Jan 08 '20 at 17:34
  • Does this answer your question? [Docker taking all space 100%](https://stackoverflow.com/questions/59624581/docker-taking-all-space-100) – Nico Haase Jan 30 '22 at 16:06

2 Answers2

3

I had the same error on docker for Mac.

I solved increasing the space in preferences->resources->"Disk image size" (for me, accessing to preferences is available if I don't close the error popup).

Jordi Martínez
  • 358
  • 3
  • 14
1

Try freeing up some space by removing dangling images and volumes. To remove dangling images

docker images -aq -f 'dangling=true' | xargs docker rmi

for volumes

docker volume ls -q -f 'dangling=true' | xargs docker volume rm

corvo
  • 676
  • 2
  • 7
  • 20