docker 磁盘问题:device or resource busy

问题:[root@hdp-gp-dk02 ~]# docker start 01ea65845e45
Error response from daemon: Cannot start container 01ea65845e45: Error getting container 01ea65845e4547be24bc3db0bc3b424faf52b8a0534eb525aa829dd9fd6081c2 from driver devicemapper: Error mounting ‘/dev/mapper/docker-8:4-100794844-01ea65845e4547be24bc3db0bc3b424faf52b8a0534eb525aa829dd9fd6081c2‘ on ‘/var/lib/docker/devicemapper/mnt/01ea65845e4547be24bc3db0bc3b424faf52b8a0534eb525aa829dd9fd6081c2‘: device or resource busy
Error: failed to start containers: [01ea65845e45]

上面的问题告诉我们docker容器挂载的磁盘忙

相同的问题经验解决:

umount /dev/cdrom /mnt ,也出现过 device or resource busy

解决方案就是卸载挂载目录:umount /dev/cdrom 或者 umount /mnt

同理,只需要将容器的挂载目录卸掉就行,我这么做了,也成功了。我想应该就是这个问题。

[root@hdp-gp-dk02 ~]# umount /var/lib/docker/devicemapper/mnt/01ea65845e4547be24bc3db0bc3b424faf52b8a0534eb525aa829dd9fd6081c2

[root@hdp-gp-dk02 ~]# docker start 01ea65845e45
01ea65845e45
[root@hdp-gp-dk02 ~]# docker ps -a

CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                      PORTS                                                                    NAMES

01ea65845e45        neo4j               "/docker-entrypoint.   2 weeks ago         Up 4 seconds                0.0.0.0:7272->7473/tcp, 0.0.0.0:7575->7474/tcp, 0.0.0.0:7171->7687/tcp   romantic_ptolemy

重新启动之后的容器成功了。

本文出自 “一起来吧” 博客,请务必保留此出处http://daxionglaiba.blog.51cto.com/11790757/1812587

文章来自:http://daxionglaiba.blog.51cto.com/11790757/1812587
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3