Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker - Disk Quotas

Tags:

docker

disk

quota

I understand that docker containers have a maximum of 10GB of disk space with the Device Mapper storage driver by default.

In my case, I have a worker container and a data volume container. I then link them together using "-volumes-from". I also use the Device Mapper storage driver.

Example, I did a test by creating a script to download a 20GB file onto my data volume container and that worked successfully.

My question, is there a 10GB quota for the data volume container? How did the 20GB file download successfully if it is limited by 10GB?

like image 276
James Avatar asked Mar 16 '15 17:03

James


1 Answers

Volumes are outside of the Union File System by definition, so any data in them will not count towards the devicemapper 10GB limit. By default volumes are stored under /var/lib/docker/vfs if you don't specify a mount point.

You can find the exactly where your volumes are on the host by using the docker inspect command e.g:

docker inspect -f {{.Volumes}} CONTAINER

You will get a result like:

map[/CONTAINER/VOLUME:/var/lib/docker/vfs/dir/5a6f7b306b96af38723fc4d31def1cc515a0d75c785f3462482f60b730533b1a]

Where the path after the colon is the location of the volume on the host.

like image 122
Adrian Mouat Avatar answered Oct 16 '22 17:10

Adrian Mouat