Docker Community Forums

Share and learn in the Docker community.

Is there a maximum size for docker volumes?

beta
docker

(Aaron Gibralter) #1

Using the postgres:9.3.12 image and a postgres_data docker volume, I attempted to restore a 100GB+ database using pg_restore but ran into a bunch of postgres errors about there being no room left on the device. My hard drive has 400GB free. I’ve been searching everywhere but can’t seem to find any information about the size of the docker VM’s disk. Is there documentation on this? Should there be documentation on it?


(Jameschevalier) #2

I’m having the same problem.

In Docker for Mac, the problem is that there’s a maximum size (about 60gb) for this file: ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2. This is where all images, containers, and volumes are stored.
The pg_restore is filling that up.

I don’t know that there’s a fix for this.
There’s this workaround, where you create a replacement Docker.qcow2 file that is allowed to grow larger, but it doesn’t really seem like a good permanent fix: No space left on device error

Here are some relevant links:

You might also be able to work around this by mounting a host directory (e.g. with -v /path/to/some/host/folder:/var/lib/postgresql/data). This would not store your data in a docker volume, which would keep it from increasing the size of that Docker.qcow2 file. This comes with some extremely poor performance, though, which is discussed here.

I’ve also asked how people get around this issue on StackOverflow.