Docker Community Forums

Share and learn in the Docker community.

No space left on device error

beta

(Joseph Tyler Jones) #23

This worked for me! .


(Clarkcw1) #24

Same issue. qcow2 file was 20+gb, so I removed it. Upon re-running my 2 (small!) containers, it ballooned back to 8gb and then stabilized. I upgraded to rc3 today and it then jumped to 14gb, where it’s now sitting.

Docker version 1.12.0-rc3, build 91e29e8, experimental


(4web2web) #25

rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
restart docker

Worked for me :thumbsup: :thumbsup:


(Beccari) #26

Resize the image after it was created won’t work. You can check the result by running a df -h on any container: docker run --rm alpine df -h. You can see the space left remains the same (about 60G).

In order to increase the image storage.

  1. Create a new “template” image with desired size: qemu-img create -f qcow2 ~/data.qcow2 120G where the 120G is my new size.
  2. Replace the default docker template /Application/Docker.app/Contents/Resources/moby/data.qcow2 with your brand new ~/data.qcow2 (I’ve saved the original just in case)
    2.1 This data.qcow2 is the initial image which is copied to mentioned path ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
  3. rm ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
    3.1 Unfortunately you have to wipe all your docker data as stated before
  4. restart docker
  5. Check disk free: docker run --rm alpine df -h

Is there a maximum size for docker volumes?
Increase docker container disk space on OS X?
(Bnewton18) #27

I deleted the file as described. However, I did an export of the images I wanted to retain before doing so. Then i imported the images after the delete. Worked great.


(Michael Gorianskyi) #28

Same thing happened on one of my Linux boxes. So not strictly Mac related.

@quasiben’s suggestion worked perfectly:


(Pauloasterio) #29

I have the same issue as above mentioned, tried thousands of things over the internet, no success!, as it turns out I changed my docker storage driver from devicemapper to aufs and everything now works like a charm.


(Ryanhertz) #30

I fixed this by manually removing some images. Use docker images to list all the images you have stored and docker rmi <image_name> to remove them. http://stackoverflow.com/a/30605040/4249632


(Brycefisherfleig) #31

I found that qemu-img was not already available on my machine. I was able to obtain it by brew install qemu.


(Clearcom) #32

You can use the one bundled with Docker.app. It’s in ‘/Applications/Docker.app/Contents/MacOS/qemu-img’


(edgl) #33

This worked like a charm for me. Thanks!


(Lambertia) #34

This method seems not to work for docker 1.13. The default template file doesn’t exist:

/Applications/Docker.app/Contents/Resources/moby
C02RR26LG8WP:moby GregoryBarron$ ls -l
total 120704
-rw-r–r-- 1 GregoryBarron admin 41 19 Jan 05:29 COMMIT
-rw-r–r-- 1 GregoryBarron admin 55400736 19 Jan 05:29 initrd.img
-rw-r–r-- 1 GregoryBarron admin 6391888 19 Jan 05:29 vmlinuz64
C02RR26LG8WP:moby GregoryBarron$


(Fezvr4sta) #35

Having the same problem but resizing the image didn’t help :frowning:

But this command DID help!

docker rmi $(docker images | grep "^<none>" | awk "{print $3}")

Source: http://stackoverflow.com/questions/30604846/docker-error-no-space-left-on-device


(Linsheng9731) #36

i delete this file and lose all my images ! :dizzy_face:


(Kotie Smit) #37

Thanx @murz.

That saved me!!

Worked like a charm.


(Andrewwolfe) #38

The command
docker volume rm $(docker volume ls -qf dangling=true)
doesn’t work for me. I get
unknown shorthand flag: 'q' in -qf
See 'docker volume rm --help'.

Tried using --quiet with same results.

running Docker Version 17.03.1-ce-win5 (10743)


(Andrewwolfe) #39

I too was having the issue about no space on device. What did work for me though was:
docker volume prune


(Shanelee007) #40

Or

docker system prune -a

Docker version Version 17.05.0-ce-mac9


(Chris Blow) #41

Ah! Thank you! docker system prune -a worked wonderfully for me.

Previously when I got the out of space error, I would spend a lot of time finding and deleting “dangling” and “exited” processes, rebuilding all my images and restarting docker. But it seems with system prune -a you SHOULD NOT stop any processes or reboot docker — that apparently would cause the images to be cleaned up.

So, with docker UP and my containers RUNNING, execute docker system prune -a

This will give the following dialog:

	- all stopped containers
	- all volumes not used by at least one container
	- all networks not used by at least one container
	- all images without at least one container associated to them
Are you sure you want to continue? [y/N] ```

Then `y` to delete lots of containers, concluding (in my case) with: `Total reclaimed space: 23.26 GB`. 

Now I'm back to work without ever rebooting docker! :tada:

(Tyler Reid) #42

This fixed me thank you very much.