解决 docker 报错: Error starting daemon: error initializing graphdriver: backing file system is unsupported for this graph driver
Docker 解决 报错 Error for is File system
2023-09-14 08:59:54 时间
CentOS 7.5 x64下
sudo yum install docker -y systemctl enable docker systemctl start docker
发现启动失败
journalctl -xe
查询获得报错
Jan 11 22:49:16 localhost.localdomain dockerd-current[29403]: time="2019-01-11T22:49:16.686305029+08:00" level=info msg="libcontainerd: new containerd process, pid: 29410"
Jan 11 22:49:17 localhost.localdomain dockerd-current[29403]: time="2019-01-11T22:49:17.696062387+08:00" level=error msg="'overlay2' requires kernel 4.7 to use on btrfs"
Jan 11 22:49:17 localhost.localdomain dockerd-current[29403]: Error starting daemon: error initializing graphdriver: backing file system is unsupported for this graph driver
docker.service: main process exited, code=exited, status=1/FAILURE Failed to start Docker Application Container Engine.
然后搜索了一番,暂时没找到。 然后就自己研究一下。
cat /etc/systemd/system/multi-user.target.wants/docker.service [Unit] Description=Docker Application Container Engine Documentation=http://docs.docker.com After=network.target Wants=docker-storage-setup.service Requires=docker-cleanup.timer [Service] Type=notify NotifyAccess=main EnvironmentFile=-/run/containers/registries.conf EnvironmentFile=-/etc/sysconfig/docker EnvironmentFile=-/etc/sysconfig/docker-storage EnvironmentFile=-/etc/sysconfig/docker-network Environment=GOTRACEBACK=crash Environment=DOCKER_HTTP_HOST_COMPAT=1 Environment=PATH=/usr/libexec/docker:/usr/bin:/usr/sbin ExecStart=/usr/bin/dockerd-current \ --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \ --default-runtime=docker-runc \ --exec-opt native.cgroupdriver=systemd \ --userland-proxy-path=/usr/libexec/docker/docker-proxy-current \ --init-path=/usr/libexec/docker/docker-init-current \ --seccomp-profile=/etc/docker/seccomp.json \ $OPTIONS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_NETWORK_OPTIONS \ $ADD_REGISTRY \ $BLOCK_REGISTRY \ $INSECURE_REGISTRY \ $REGISTRIES ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=1048576 LimitNPROC=1048576 LimitCORE=infinity TimeoutStartSec=0 Restart=on-abnormal KillMode=process [Install] WantedBy=multi-user.target cat /etc/sysconfig/docker-storage DOCKER_STORAGE_OPTIONS="--storage-driver overlay2 "
尝试执行dockerd 命令,结果运行成功,提示:
dockerd INFO[0000] libcontainerd: new containerd process, pid: 29626 WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096 INFO[0001] [graphdriver] using prior storage driver: btrfs INFO[0001] Graph migration to content-addressability took 0.00 seconds INFO[0001] Loading containers: start. INFO[0001] Firewalld running: false INFO[0001] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address INFO[0001] Loading containers: done. WARN[0001] failed to retrieve docker-runc version: exec: "docker-runc": executable file not found in $PATH WARN[0001] failed to retrieve docker-init version INFO[0001] Daemon has completed initialization INFO[0001] Docker daemon commit="07f3374/1.13.1" graphdriver=btrfs version=1.13.1 INFO[0001] API listen on /var/run/docker.sock
发现了关键字: graphdriver=btrfs 以及之前的报错有提示: error msg="'overlay2' requires kernel 4.7 to use on btrfs"
所以尝试修改 /etc/sysconfig/docker-storage 为:
DOCKER_STORAGE_OPTIONS="--storage-driver btrfs "
重新启动docker:
systemctl start docker
启动成功.问题解决!
下面开始 docker 学习.
相关文章
- Win10 家庭版安装Docker失败?试试这个解决步骤
- rules_docker_for_insecure_registries for KubeVirt
- nginx ssl证书生成_docker ssl证书
- docker-compose部署solo
- 记一次docker启动失败的问题排查与解决
- maven阿里云仓库配置_阿里docker仓库
- Docker - docker-compose方式搭建高效的开发环境
- 【docker-compose】一键部署WordPress博客
- 【Docker】使用docker安装部署NextCloud私人网盘
- 【已解决】在docker里面安装es时候提示IPv4 forwarding is disabled. Networking will not work.
- 【Docker学习系列】Docker学习3-docker的run命令干了什么?docker为什么比虚拟机快?
- Docker服务的停止命令(systemctl stop docker)
- Docker高级篇:docker网络的四种类型
- 一文学会Docker使用
- 「 【Docker】docker的基础使用介绍(小白如何使用docker) 」
- 「 【Docker】用docker运行2048小游戏(玩转docker) 」
- 「 【Docker】设置docker加速器(如何使docker下载速度变快) 」
- 云原生之使用docker部署httpd服务
- 2023-01-13:joxit/docker-registry-ui是registry的web界面工具之一。请问部署在k3s中
- Docker容器监控之 CAdvisor+InfluxDB+Granfana
- Docker安装Kafka(docker-compose)、EFAK监控
- docker自动部署多环境,php自动部署工具
- 解决centos7中docker启动tomcat后主机访问报404的问题
- docker安装tomcat
- docker镜像多阶段构建的原理以及好处
- 月薪 5w+,2023 懂点 K8s/Docker 真的太有必要了!| 极客时间
- Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running
- docker-compose示例
- Docker容器的重启策略及docker run的–restart选项详解程序员
- 使用Docker安装Redis,一步到位!(docker安装redis)
- 使用 Docker 和 Elasticsearch 构建一个全文搜索应用程序
- Docker compse实战案例-实现单机版的Haproxy+Nginx+Tomcat
- 容器间通信的三种方式 – 每天5分钟玩转 Docker 容器技术(35)
- 学容器必须懂 bridge 网络 – 每天5分钟玩转 Docker 容器技术(32)