Docker Machine: No space left on device
I had the same error ([ERROR] InnoDB: Error number 28 means 'No space left on device'
) and solve it this way:
1 . Delete the orphaned volumes in Docker, you can use the built-in docker volume command. The built-in command also deletes any directory in /var/lib/docker/volumes that is not a volume so make sure you didn't put anything in there you want to save.
Warning be very careful with this if you have some data you want to keep
Cleanup:
$ docker volume rm $(docker volume ls -qf dangling=true)
Additional commands:
List dangling volumes:
$ docker volume ls -qf dangling=true
List all volumes:
$ docker volume ls
2 . Also consider removing all the unused Images.
First get rid of the <none>
images (those are sometimes generated while building an image and if for any reason the image building was interrupted, they stay there).
here's a nice script I use to remove them
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
Then if you are using Docker Compose to build Images locally for every project. You will end up with a lot of images usually named like your folder (example if your project folder named Hello, you will find images name Hello_blablabla
). so also consider removing all these images
you can edit the above script to remove them or remove them manually with
docker rmi {image-name}
Like said above, the tmpfs
has nothing to do with --virtualbox-disk-size
. It seems like boot2docker mounts tmpfs
into memory, so you need to dedicate more memory to your virtualbox vm. You can do it by specifying the --virtualbox-memory
parameter.
--virtualbox-memory "1024"Size of memory for host in MB [$VIRTUALBOX_MEMORY_SIZE]
Defaults:
$ docker-machine create --driver virtualbox testACreating VirtualBox VM...Creating SSH key...Starting VirtualBox VM...Starting VM...$ docker-machine ssh testA ## . ## ## ## == ## ## ## ## ## === /"""""""""""""""""\___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\_______/ _ _ ____ _ _| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ ||_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|Boot2Docker version 1.8.1, build master : 7f12e95 - Thu Aug 13 03:24:56 UTC 2015Docker version 1.8.1, build d12ea79docker@testA:~$ df -h /Filesystem Size Used Available Use% Mounted ontmpfs 896.6M 112.7M 783.9M 13% /
With --virtualbox-memory
set to 8096
$ docker-machine create --driver virtualbox --virtualbox-memory 8096 testBCreating VirtualBox VM...Creating SSH key...Starting VirtualBox VM...Starting VM...$ docker-machine ssh testB ## . ## ## ## == ## ## ## ## ## === /"""""""""""""""""\___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\_______/ _ _ ____ _ _| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ ||_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|Boot2Docker version 1.8.1, build master : 7f12e95 - Thu Aug 13 03:24:56 UTC 2015Docker version 1.8.1, build d12ea79docker@testB:~$ df -h /Filesystem Size Used Available Use% Mounted ontmpfs 6.9G 112.4M 6.8G 2% /
If you are using Docker Community Edition:
docker system prune --volumes
If you are using boot2docker (docker-machine) clear the volumes that are orphaned:
docker volume rm $(docker volume ls -qf dangling=true)
Clear unused images:
docker rmi $(docker images -q -f "dangling=true")