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

dockerd: Error running deviceCreate (CreatePool) dm_task_run failed

我正在使用 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

我读到这可能是因为我没有足够的 space 磁盘,我认为不是这样,知道吗?

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

我收到 "There are no more loopback devices available" 错误,从 运行 停止了 dockerd。

我通过确保存储驱动程序是 'overlay':

来修复它
# /usr/bin/dockerd -D --storage-driver=overlay

这是在 Debian Jessie 和 docker 运行 作为 systemd service/unit。

为了让它永久化,我创建了一个 systemd 插件:

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