zoukankan      html  css  js  c++  java
  • CentOS7安装docker启动报错Error while creating filesystem xfs on device docker-253:0-1052028-base: exit status 1 storage-driver=devicemappe

    安装docker后,使用systemctl start docker无法启动:

    [root@localhost ~]# 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.
    [root@localhost ~]# systemctl status -l docker
    ● docker.service - Docker Application Container Engine
       Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
       Active: failed (Result: start-limit) since 四 2020-05-14 11:02:36 CST; 5s ago
         Docs: https://docs.docker.com
      Process: 6732 ExecStart=/usr/bin/dockerd (code=exited, status=1/FAILURE)
     Main PID: 6732 (code=exited, status=1/FAILURE)
    
    5月 14 11:02:36 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
    5月 14 11:02:36 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
    5月 14 11:02:36 localhost.localdomain systemd[1]: docker.service failed.
    5月 14 11:02:36 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
    5月 14 11:02:36 localhost.localdomain systemd[1]: Stopped Docker Application Container Engine.
    5月 14 11:02:36 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service
    5月 14 11:02:36 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
    5月 14 11:02:36 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
    5月 14 11:02:36 localhost.localdomain systemd[1]: docker.service failed.

    systemctl status查看的信息不全,因此直接使用dockerd命令启动,可以看见如下报错:

    [root@localhost ~]# dockerd
    INFO[2020-05-14T11:04:27.490967318+08:00] libcontainerd: started new docker-containerd process  pid=6797
    INFO[2020-05-14T11:04:27.491075574+08:00] parsed scheme: "unix"                         module=grpc
    INFO[2020-05-14T11:04:27.491092294+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
    INFO[2020-05-14T11:04:27.491159873+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0  <nil>}]  module=grpc
    INFO[2020-05-14T11:04:27.491182805+08:00] ClientConn switching balancer to "pick_first"  module=grpc
    INFO[2020-05-14T11:04:27.491277247+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204d47b0, CONNECTING  module=grpc
    INFO[0000] starting containerd                           revision=468a545b9edcd5932818eb9de8e72413e616e86e version=v1.1.2
    INFO[0000] loading plugin "io.containerd.content.v1.content"...  type=io.containerd.content.v1
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"...  type=io.containerd.snapshotter.v1
    WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.aufs"...  type=io.containerd.snapshotter.v1
    WARN[0000] failed to load plugin io.containerd.snapshotter.v1.aufs  error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found.
    ": exit status 1"
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.native"...  type=io.containerd.snapshotter.v1
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  type=io.containerd.snapshotter.v1
    WARN[0000] failed to load plugin io.containerd.snapshotter.v1.overlayfs  error="/var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support"
    INFO[0000] loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1
    WARN[0000] failed to load plugin io.containerd.snapshotter.v1.zfs  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
    INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"...  type=io.containerd.metadata.v1
    WARN[0000] could not use snapshotter aufs in metadata plugin  error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found.
    ": exit status 1"
    WARN[0000] could not use snapshotter overlayfs in metadata plugin  error="/var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.overlayfs does not support d_type. If the backing filesystem is xfs, please reformat with ftype=1 to enable d_type support"
    WARN[0000] could not use snapshotter zfs in metadata plugin  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
    WARN[0000] could not use snapshotter btrfs in metadata plugin  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
    INFO[0000] loading plugin "io.containerd.differ.v1.walking"...  type=io.containerd.differ.v1
    INFO[0000] loading plugin "io.containerd.gc.v1.scheduler"...  type=io.containerd.gc.v1
    INFO[0000] loading plugin "io.containerd.service.v1.containers-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.content-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.diff-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.images-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.leases-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.namespaces-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.service.v1.snapshots-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.monitor.v1.cgroups"...  type=io.containerd.monitor.v1
    INFO[0000] loading plugin "io.containerd.runtime.v1.linux"...  type=io.containerd.runtime.v1
    INFO[0000] loading plugin "io.containerd.service.v1.tasks-service"...  type=io.containerd.service.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.containers"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.content"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.diff"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.events"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.healthcheck"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.images"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.leases"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.namespaces"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.snapshots"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.tasks"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.version"...  type=io.containerd.grpc.v1
    INFO[0000] loading plugin "io.containerd.grpc.v1.introspection"...  type=io.containerd.grpc.v1
    INFO[0000] serving...                                    address="/var/run/docker/containerd/docker-containerd-debug.sock"
    INFO[0000] serving...                                    address="/var/run/docker/containerd/docker-containerd.sock"
    INFO[0000] containerd successfully booted in 0.009126s  
    INFO[2020-05-14T11:04:27.534492387+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204d47b0, READY  module=grpc
    INFO[2020-05-14T11:04:27.542046514+08:00] parsed scheme: "unix"                         module=grpc
    INFO[2020-05-14T11:04:27.542078661+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
    INFO[2020-05-14T11:04:27.542179821+08:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0  <nil>}]  module=grpc
    INFO[2020-05-14T11:04:27.542214530+08:00] ClientConn switching balancer to "pick_first"  module=grpc
    INFO[2020-05-14T11:04:27.542343338+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204ec6a0, CONNECTING  module=grpc
    INFO[2020-05-14T11:04:27.542623044+08:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4204ec6a0, READY  module=grpc
    WARN[2020-05-14T11:04:27.549732573+08:00] 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 section.  storage-driver=devicemapper
    INFO[2020-05-14T11:04:27.729821203+08:00] Creating filesystem xfs on device docker-253:0-1052028-base, mkfs args: [-m crc=0,finobt=0 /dev/mapper/docker-253:0-1052028-base]  storage-driver=devicemapper
    INFO[2020-05-14T11:04:27.731014275+08:00] Error while creating filesystem xfs on device docker-253:0-1052028-base: exit status 1  storage-driver=devicemapper
    ERRO[2020-05-14T11:04:27.731045626+08:00] [graphdriver] prior storage driver devicemapper failed: exit status 1 
    Error starting daemon: error initializing graphdriver: exit status 1

    这是因为XFS文件系统管理工具的版本太低,使用如下命令升级:

    [root@localhost ~]# yum update xfsprogs -y

    再次启动docker,就可以发现可以正常启动了:

    [root@localhost ~]# systemctl start docker
    [root@localhost ~]# echo $?
    0
    [root@localhost ~]# systemctl status docker
    ● docker.service - Docker Application Container Engine
    Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
    Active: active (running) since 四 2020-05-14 11:14:19 CST; 2min 2s ago
    Docs: https://docs.docker.com
    Main PID: 7115 (dockerd)
  • 相关阅读:
    Educational Codeforces Round 83 --- F. AND Segments
    Educational Codeforces Round 83 --- G. Autocompletion
    SEERC 2019 A.Max or Min
    2019-2020 ICPC Southwestern European Regional Programming Contest(Gym 102501)
    Educational Codeforces Round 78 --- F. Cards
    今天我学习了一门全新的语言
    codeforces 1323D 题解(数学)
    Educational Codeforces Round 80 (Div. 2) 题解 1288A 1288B 1288C 1288D 1288E
    Educational Codeforces Round 81 (Div. 2) 题解 1295A 1295B 1295C 1295D 1295E 1295F
    Codeforces Round #617 (Div. 3) 题解 1296C 1296D 1296E 1296F
  • 原文地址:https://www.cnblogs.com/hanxiaomeng/p/12887262.html
Copyright © 2011-2022 走看看