Docker dm_task_run failed error,如何解决?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (63)

今天我第一次在Fedora 21上安装了Docker。现在,我需要更改默认/var/lib/docker中的docker图像文件夹的位置。

在复制文件(删除了devicemapper子文件夹,停靠服务停止)并更改/etc/sysconfig/docker(add-g选项)后,我再次运行docker服务,没有问题,创建了devicemapper/元数据。

接下来,我试图画出第一张图片:

docker pull centos

但发生了以下错误:

docker pull centos
latest: Pulling from docker.io/centos

6941bfcbbfca: Download complete 
6941bfcbbfca: Error downloading dependent layers 
41459f052977: Downloading [==========================>                        ] 41.61 MB/77.28 MB
fd44297e2ddb: Error pulling image (latest) from docker.io/centos, endpoint: https://registry-1.docker.io/v1/, Driver devicemapper failed to create image rootfs 6941bfcbbfca7f4f48becd38f2639157042bfd44297e2ddb: Error pulling image (latest) from docker.io/centos, Driver devicemapper failed to create image rootfs 6941bfcbbfca7f4f48becd38f2639157042b5cf9ab8c080f1d8b6d047380ecfc: Error running DeviceCreate (createSnapDevice) dm_task_run failed 
FATA[0013] Error pulling image (latest) from docker.io/centos, Driver devicemapper failed to create image rootfs 6941bfcbbfca7f4f48becd38f2639157042b5cf9ab8c080f1d8b6d047380ecfc: Error running DeviceCreate (createSnapDevice) dm_task_run failed 

提问于
用户回答回答于
用户回答回答于

1)service docker stop

2)thin_check /home/docker/devicemapper/devicemapper/metadata

3)thin_check --clear-needs-check-flag /home/docker/devicemapper/devicemapper/metadata

4)service docker start

扫码关注云+社区