centos 7系统,docker安装之后,使用 systemctl start docker启动服务报错:
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
使用命令 journalctl -xe查看详情,
Jan 16 14:41:41 node01 dockerd[2873]: time="2019-01-16T14:41:41.412467512+08:00" level=warning msg="devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man dockerd` to refer to dm.thinpooldev
Jan 16 14:41:41 node01 systemd-udevd[2818]: inotify_add_watch(7, /dev/dm-3, 10) failed: No such file or directory
Jan 16 14:41:41 node01 dockerd[2873]: time="2019-01-16T14:41:41.705380248+08:00" level=info msg="devmapper: Creating filesystem xfs on device docker-253:1-1052638-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:1-1052638-base]"
Jan 16 14:41:41 node01 dockerd[2873]: time="2019-01-16T14:41:41.706717698+08:00" level=info msg="devmapper: Error while creating filesystem xfs on device docker-253:1-1052638-base: exit status 1"
Jan 16 14:41:41 node01 dockerd[2873]: time="2019-01-16T14:41:41.706767401+08:00" level=error msg="[graphdriver] prior storage driver devicemapper failed: exit status 1"
Jan 16 14:41:41 node01 dockerd[2873]: Error starting daemon: error initializing graphdriver: exit status 1
Jan 16 14:41:41 node01 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jan 16 14:41:41 node01 systemd[1]: Failed to start Docker Application Container Engine.
发现标红的这句报错导致启动失败退出,查了下资料发现有个叫做xfsprogs的东东,下载了xfsprogs-4.5.0-18.el7.x86_64.rpm文件安装,
yum install local xfsprogs-4.5.0-18.el7.x86_64.rpm
安装完成,再次启动docker服务,问题完美解决。