如果有container在运行的时候重启 docker 服务, 可能会导致 container无法启动, 错误信息类似于
Error response from daemon: Cannot start container zookeeper: Error getting container ddf1dd91bbf46dc648268327f8f7c6fffaf2f19cda5cf1d97fdc701016d4332c from driver devicemapper: Error mounting '/dev/mapper/docker-8:1-525372-ddf1dd91bbf46dc648268327f8f7c6fffaf2f19cda5cf1d97fdc701016d4332c'on'/var/lib/docker/devicemapper/mnt/ddf1dd91bbf46dc648268327f8f7c6fffaf2f19cda5cf1d97fdc701016d4332c': device or resource busy2015/01/2604:42:07 Error: failed tostart one or more containers
这是一个docker的 bug
解决方式是先找出没有unmount的路径
cat /proc/mounts | grep "mapper/docker" | awk '{print $2}'
然后依次unmount
转载于:https://blog.51cto.com/zxx287856774/1811730