gpt4 book ai didi

docker 启动 : no space left on device

转载 作者:太空宇宙 更新时间:2023-11-03 17:18:30 25 4
gpt4 key购买 nike

我发现我的一个容器掉了。这是我第二次遇到这个问题。当我尝试使用 docker start 启动它时,我得到:

Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:359: container init caused \\"rootfs_linux.go:89: jailing process inside rootfs caused \\\\"can't create pivot_root dir , error mkdir /var/lib/docker/devicemapper/mnt/da2101d43e6c8200eb22a4415b0aedf8033c7c701a19392217b8947738a723bf/rootfs/.pivot_root592021975: no space left on device\\\\"\\"\"\n" Error: failed to start containers: mydockername

知道为什么我的设备上没有剩余空间吗?主机体积仅占6%。

我使用的是 CentOS Docker 版本 1.12.3,build 6b644ec

最佳答案

容器的磁盘空间是有限的,而不是主机空间。容器磁盘空间默认限制为 10G。如果docker storage是devicemapper,可以挂载容器文件系统,删除一些日志。然后就可以启动容器了。

~# docker start centos3_50_pay

Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused "rootfs_linux.go:89: jailing process inside rootfs caused "can't create pivot_root dir , error mkdir /var/lib/docker/devicemapper/mnt/96fd436942ce6c9a618ccea9c52f5e9b766065db9e7edf870967b27fbaf3f9bf/rootfs/.pivot_root558329180: no space left on device"

Error: failed to start containers: centos3_50_pay

~# docker inspect centos3_50_pay | grep Device  
"Devices": [],
"DeviceId": "467",
"DeviceName": "docker-253:0-3222880762-96fd436942ce6c9a618ccea9c52f5e9b766065db9e7edf870967b27fbaf3f9bf",
"DeviceSize": "10737418240"

~# cat /var/lib/docker/devicemapper/metadata/ \
96fd436942ce6c9a618ccea9c52f5e9b766065db9e7edf870967b27fbaf3f9bf
{"device_id":467,"size":10737418240,"transaction_id":736,\
"initialized":false,"deleted":false}

~# echo "10737418240/512" |bc
20971520
~# dmsetup ls
docker-thinpool (253:5)

~# dmsetup create tmp --table "0 20971520 thin /dev/mapper/ \
docker-thinpool 467"
~# mount /dev/mapper/tmp /root/tmp
~# cd /root/tmp/rootfs/
~# ll
~# umount /root/tmp
~# dmsetup remove tmp
~# docker start centos3_50_pay
centos3_50_pay

关于 docker 启动 : no space left on device,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40340978/

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