gpt4 book ai didi

docker - Gitlab 运行器 : cannot reclaim Docker space on Ubuntu - no space left on device

转载 作者:行者123 更新时间:2023-12-04 18:54:24 25 4
gpt4 key购买 nike

我在 EC2(Ubuntu 18.04)上运行一个私有(private) Gitlab Group 运行器。它最近经常在各个阶段开始失败的构建作业,但都有相同的根本原因:no space left on device .
在登录 EC2 实例时,我可以看到

  System load:                    0.0
Usage of /: 99.5% of 29.02GB
Memory usage: 14%
Processes: 109

=> / is using 99.5% of 29.02GB
=> There are 3 zombie processes.
磁盘可用空间显示 //var/lib/docker/overlay2 100% 使用时:
/# df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 395M 928K 394M 1% /run
/dev/xvda1 30G 29G 140M 100% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
overlay 30G 29G 140M 100% /var/lib/docker/overlay2/ed591...60f1/merged
shm 64M 0 64M 0% /var/lib/docker/containers/e9de...f8ed/mounts/shm
overlay 30G 29G 140M 100% /var/lib/docker/overlay2/0956c...e51f/merged
shm 64M 0 64M 0% /var/lib/docker/containers/4cab...0ba8/mounts/shm
/dev/loop1 18M 18M 0 100% /snap/amazon-ssm-agent/1566
/dev/loop3 29M 29M 0 100% /snap/amazon-ssm-agent/2012
/dev/loop2 97M 97M 0 100% /snap/core/9436
/dev/loop4 97M 97M 0 100% /snap/core/9665
tmpfs 395M 0 395M 0% /run/user/1000
Docker 磁盘使用情况显示 ~21GB,显然无法认领:
/# docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 2 2 746MB 0B (0%)
Containers 2 2 8.989MB 0B (0%)
Local Volumes 3 3 20.4GB 0B (0%)
Build Cache 0 0 0B 0B
修剪什么都不做:
/# docker system prune
Total reclaimed space: 0B
如何识别正在使用此磁盘空间的内容并最终回收它?

最佳答案

执行docker system prune使用默认选项仅回收空闲容器、网络保留的空间 - 它不会删除图像。
为了也删除所有未使用的图像,您需要运行:

docker system prune -a

关于docker - Gitlab 运行器 : cannot reclaim Docker space on Ubuntu - no space left on device,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63058210/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com