无法删除失效的Docker容器.存储驱动程序:btrfs [英] Cannot remove dead docker containers. Storage driver: btrfs
本文介绍了无法删除失效的Docker容器.存储驱动程序:btrfs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在移走坏掉的容器时遇到了麻烦.当我尝试删除容器时,我得到:
I am having trouble removing dead containers. When I try to remove container I get:
$ docker rm -f d1dd3082f7bb
Error response from daemon: Unable to remove filesystem for d1dd3082f7bbfc2310e497d0af47d51a8ca4e6e90a0d565a85d033f96a12325f: remove /var/lib/docker/containers/d1dd3082f7bbfc2310e497d0af47d51a8ca4e6e90a0d565a85d033f96a12325f/shm: device or resource busy
以前从未遇到过这样的问题.有关当前设置的一些信息:
Have never encountered such problem before. Some information about current setup:
$ uname -a
Linux AUIS1 3.16.6-2-default #1 SMP Mon Oct 20 13:47:22 UTC 2014 (feb42ea) x86_64 x86_64 x86_64 GNU/Linux
$ docker info
Containers: 19
Running: 15
Paused: 0
Stopped: 4
Images: 19
Server Version: 1.12.1
Storage Driver: btrfs
Build Version: Btrfs v3.16+20140829
Library Version: 101
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: overlay bridge null host
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Security Options: apparmor
Kernel Version: 3.16.6-2-default
Operating System: openSUSE 13.2 (Harlequin) (x86_64)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.66 GiB
Name: AUIS1
ID: PPHC:6VP2:PWW4:2JLX:I2UI:FZ3M:LWEQ:ZR6H:RV2K:HWRQ:VUCD:OPUH
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
WARNING: No kernel memory limit support
Cluster Store: consul://10.10.1.7:8500
Cluster Advertise: 10.10.1.7:2375
Insecure Registries:
127.0.0.0/8
如何安全删除它们?
忘记提及这些容器是由docker swarm和compose管理的.
Forgot to mention that these containers are managed by docker swarm and compose.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4a1193af7710 6ca7469301cb "/bin/sh -c 'exec jav" 5 days ago Dead 4a1193af7710_4a1193af7710_4a1193af7710_xxxxxx2
f0446365fb75 e56d2658c291 "/bin/sh -c 'exec jav" 5 days ago Dead f0446365fb75_f0446365fb75_f0446365fb75_f0446365fb75_xxxxx1
243e27c2cdf3 50e38ce0458f "docker-entrypoint.sh" 6 days ago Dead 243e27c2cdf3_243e27c2cdf3_243e27c2cdf3_redis
添加docker检查死容器,检查输出
Adding docker inspect of dead container, inspect output
$ docker inspect 4a1193af7710
推荐答案
grep d1dd3082f7bbfc2310e497d0af47d51a8ca4e6e90a0d565a85d033f96a12325f /proc/*/mountinfo
然后找到 d1dd3082f7bbfc2310e497d0af47d51a8ca4e6e90a0d565a85d033f96a12325f
的pid并杀死它
then find the pid of d1dd3082f7bbfc2310e497d0af47d51a8ca4e6e90a0d565a85d033f96a12325f
and kill it
这篇关于无法删除失效的Docker容器.存储驱动程序:btrfs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文