Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No space in docker thin pool

I'm receiving an error trying to launch task definitions in ECS:

CannotPullContainerError: failed to register layer: devmapper: Thin Pool has 4405 free data blocks which is less than minimum required 4480 free data blocks. Create more free space in thin pool or use dm.min_free_space option to change behavior

I found this post which has a few recommended steps, but running these does not solve the problem.

Here is the info I receive from docker info

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 1
Server Version: 1.12.6
Storage Driver: devicemapper
 Pool Name: docker-202:1-655458-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 45.74 MB
 Data Space Total: 107.4 GB
 Data Space Available: 13.71 GB
 Metadata Space Used: 622.6 kB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.147 GB
 Thin Pool Minimum Free Space: 10.74 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93-RHEL7 (2015-01-28)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.4.35-33.55.amzn1.x86_64
Operating System: Amazon Linux AMI 2016.09
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.862 GiB
Name: ip-172-31-53-68
ID: W556:CIZO:27KA:JYLI:ZXUS:FTCF:TMU4:5SL5:OD4P:HNP3:PRUM:BUNX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8

I'm really stuck on what to do here... I can't launch any new deploys.

like image 945
D'Arcy Rail-Ip Avatar asked Apr 19 '17 20:04

D'Arcy Rail-Ip


People also ask

What is thin pool in docker?

It specifies the min free space in GB in a thin pool required for a new device creation to succeed. This check applies to both free data space as well as free metadata space. Container creation (during docker pull or docker run ) fails if free space in thin pool is less than the value in Thin Pool Minimum Free Space .

What is Devicemapper in docker?

Device Mapper is a kernel-based framework that underpins many advanced volume management technologies on Linux. Docker's devicemapper storage driver leverages the thin provisioning and snapshotting capabilities of this framework for image and container management.


2 Answers

Had the same issue. The solution in the post you've mentioned does not remove unused images.

$ Docker system prune -a did the trick.

More details here

like image 77
iGili Avatar answered Sep 18 '22 08:09

iGili


Try this :-

# docker volume rm $(docker volume ls -qf dangling=true)
# docker rm $(docker ps -q -f 'status=exited')
like image 20
Sunny Avatar answered Sep 18 '22 08:09

Sunny