容器状态变为Removal In Progress的解决方法device or resource busy

迎刃而解 盛行 4个月前 (05-31) 398次浏览 已收录 0个评论 扫描二维码
文章目录
[隐藏]

1.简介

之前安装好的onlyoffice服务器,今天停电来电之后启动不起来了,容器状态变成了“Removal In Progress”,强制删除又删除不掉,提示“Error response from daemon: container c94c3c5cf8356f483a6bff79a09623635da8b0c5468d6a5086ecf6cb60cf6cca: driver “btrfs” failed to remove root filesystem: Failed to destroy btrfs snapshot /volume1/@docker/btrfs/subvolumes for 54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b: device or resource busy”重新也不行,最后通过定位到pid,然后杀死pid解决。

2.相关

DSM系统版本:6.2.3-25426
docker-ce版本:18.09.8
onlyoffice/documentserver版本:5.5.1.76

3.步骤

3.1.查看容器状态

root@pan:~# docker ps -a
CONTAINER ID  IMAGE                               COMMAND                  CREATED      STATUS               PORTS  NAMES
c94c3c5cf835  onlyoffice/documentserver:5.5.1.76  "/bin/sh -c /app/ds/…"   12 days ago  Removal In Progress         Onlyoffice-Documentserver-Kodbox

3.2.强制删除容器

root@pan:~# docker rm -f c94c3c5cf835
Error response from daemon: container c94c3c5cf8356f483a6bff79a09623635da8b0c5468d6a5086ecf6cb60cf6cca: driver "btrfs" failed to remove root filesystem: Failed to destroy btrfs snapshot /volume1/@docker/btrfs/subvolumes for 54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b: device or resource busy

3.3.定位进程

root@pan:~# grep docker /proc/*/mountinfo |grep 54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b
grep: /proc/19129/mountinfo: Invalid argument
grep: /proc/19132/mountinfo: Invalid argument
grep: /proc/19135/mountinfo: Invalid argument
/proc/22878/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/23061/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/23903/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/24553/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/24554/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/24555/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/24556/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/24557/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/24558/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/25283/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
/proc/27336/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50
grep: /proc/7170/mountinfo: Invalid argument
grep: /proc/7269/mountinfo: Invalid argument
grep: /proc/7275/mountinfo: Invalid argument
/proc/7350/mountinfo:209 142 0:37 /@docker/btrfs/subvolumes/54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b / rw,relatime master:1 - btrfs /dev/md2 rw,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50

3.4.结束进程并验证

root@pan:~# kill -9 22878 23061 23903 24553 24554 24555 24556 24557 24558 25283 27336
root@pan:~# grep docker /proc/*/mountinfo |grep 54fafd468da290df90bc9481f3701207dbd8af74e38b413a24a934ebe16c727b
grep: /proc/19129/mountinfo: Invalid argument
grep: /proc/19132/mountinfo: Invalid argument
grep: /proc/19135/mountinfo: Invalid argument
grep: /proc/9030/mountinfo: Invalid argument

3.5.删除容器

root@pan:~# docker rm -f Onlyoffice-Documentserver-Kodbox
Onlyoffice-Documentserver-Kodbox

4.效果

然后更换了一个新版本

容器状态变为Removal In Progress的解决方法device or resource busy


IT博客站版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:容器状态变为Removal In Progress的解决方法device or resource busy
喜欢 (0)
[使用支付宝扫码]
分享 (0)
盛行
关于作者:
企业应用技术爱好者,喜欢分享知识。如果文章中有错误,欢迎指正,谢谢。
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址