docker容器启动失败(devmapper: Thin Pool has 11750 free data blocks which is less than minimum required 11)

现象场景

在marathon+mesos+docker环境,升级应用镜像,应用容器始终拉不起来,发现是为docker分配的Pool资源不足,升级的镜像版本无法拉取到本地。

报错内容如下:
[execShellScript992994] 8d4e8b19f1b1: Error pulling image (4) from X.X.X.X:5005/XXXcenter_dev_20200409, endpoint: http://X.X.X.X:5005/v1/, failed to register layer: devmapper: Thin Pool has 11750 free data blocks which is less than minimum required 11754 free data blocks. Create more free space in thin pool or use dm.min_free_space option to change behavior
[execShellScript992994] 8d4e8b19f1b1: Error pulling image (4) from X.X.X.X:5005/XXXcenter_dev_20200409, failed to register layer: devmapper: Thin Pool has 11750 free data blocks which is less than minimum required 11754 free data blocks. Create more free space in thin pool or use dm.min_free_space option to change behavior
[execShellScript992994] Error pulling image (4) from X.X.X.X:5005/XXXcenter_dev_20200409, failed to register layer: devmapper: Thin Pool has 11750 free data blocks which is less than minimum required 11754 free data blocks. Create more free space in thin pool or use dm.min_free_space option to change behavior

 

问题解决

由于经过长时间的运行,本地存储了很多的历史镜像版本和死亡容器快照,需要设置定期任务对历史镜像版本和死亡容器快照进行清理。

docker image prune -a -f  #强制删除所有未被容器使用的镜像
docker rm $(docker ps -q -f status=exited)  #强制清理退出的容器快照

你可能感兴趣的:(docker)