dockerd:运行deviceCreate(CreatePool)时出错dm_task_run失败

时间:2016-10-25 12:54:54

标签: linux docker centos centos7 loopback

我正在使用VMWare构建一些CentOS VM,无法访问互联网,因此我已经下载并制作了本地存储库,包括this one 然后我安装了docker-engine.x86_64,启动docker守护进程时,出现以下错误:

[root]# dockerd
DEBU[0000] docker group found. gid: 993
...
...
DEBU[0001] Error retrieving the next available loopback: open /dev/loop-control: no such device
ERRO[0001] **There are no more loopback devices available.**
ERRO[0001] [graphdriver] prior storage driver "devicemapper" failed: loopback attach failed
DEBU[0001] Cleaning up old mountid : start.
FATA[0001] Error starting daemon: error initializing graphdriver: loopback attach failed

使用此命令手动添加控制回路设备的循环模块后:

insmod /lib/modules/3.10.0-327.36.2.el7.x86_64/kernel/drivers/block/loop.ko

错误更改为:

 [graphdriver] prior storage driver "devicemapper" failed: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed

我读过这可能是因为我没有足够的空间磁盘,我认为不是这样,任何想法?

[root]# df -k .
Filesystem               blocs de 1K Used      Available Used Mounted on
/dev/mapper/centos-root    51887356 2436256   49451100   5%    /

1 个答案:

答案 0 :(得分:0)

我得到了“没有更多可用的环回设备”错误,这使得dockerd无法运行。

我通过确保存储驱动程序是“覆盖”来修复它:

# /usr/bin/dockerd -D --storage-driver=overlay

这是在Debian Jessie和docker作为系统服务/单元运行。

为了使它永久化,我创建了一个systemd drop-in:

$ cat /etc/systemd/system/docker.service.d/docker.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --storage-driver=overlay