Issue
I am learning docker and I am using v1.11.0 I am trying to install hadoop but devmapper is complaining about free disk space?
devmapper: Thin Pool has 82984 free data blocks which is less than minimum required 163840 free data blocks. Create more free space in thin pool or use dm.min_free_space option to change behavior
I have deleted all my images but the problem persists:
[root@localhost hadoop_docker]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
debian latest 47af6ca8a14a 3 weeks ago 125 MB
[root@localhost hadoop_docker]#
and this is my disk configuration:
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 8G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 7.5G 0 part
├─centos-root 253:0 0 6.7G 0 lvm /
└─centos-swap 253:1 0 820M 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
loop0 7:0 0 100G 0 loop
└─docker-253:0-844682-pool 253:2 0 100G 0 dm
loop1 7:1 0 2G 0 loop
└─docker-253:0-844682-pool 253:2 0 100G 0 dm
How can I free up the disk space?
Solution
You can use:
docker system prune -a -f --volumes
where:
- -a == removes all unused images
- -f == force
- --volumes == prune volumes.
see: https://docs.docker.com/engine/reference/commandline/system_prune/#description
as a side note, I had a lot of issues when I used devicemapper driver on my environment. I used to clean as I mentioned, but there were still other devicemapper issues. I strongly recommend moving to overlay2, it solved almost everything completely.
Answered By - Tidhar Klein Orbach Answer Checked By - Mary Flores (WPSolving Volunteer)