CentOS7 下安装配置 Docker,遇到如下的WARNING,

WARNING: overlay: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior.
Reformat the filesystem with ftype=1 to enable d_type support.
Running without d_type support will not be supported in future releases.

xfs 文件系统不支持d_type,建议重新格式化文件系统加上 ftype=1 来打开 d_type 的支持,下面来了解下 xfs 下的 d_type。

d_type 对于Docker来说这么重要呢?
要知道Overlay 和 Overlay2是Docker支持的两种存储驱动,类似AUFS,其主要有如下几个特性:

   1) 设计更加简单;
   2) 从3.18内核开始,就进入了Linux内核主线;
   3) 速度更快。

Docker的overlay存储驱动利用了很多OverlayFS特性来构建和管理镜像与容器的磁盘结构。自从Docker1.12起,Docker也支持overlay2存储驱动,相比于overlay来说,overlay2在inode优化上更加高效。但overlay2驱动只兼容Linux kernel4.0以上的版本。
  注:自从OverlayFS加入kernel主线后,它在kernel模块中的名称就被从overlayfs改为overlay了。
OverlayFS使用两个目录,把一个目录置放于另一个之上,并且对外提供单个统一的视角。这两个目录通常被称作层,这个分层的技术被称作union mount。术语上,下层的目录叫做lowerdir,上层的叫做upperdir。对外展示的统一视图称作merged。
下图展示了Docker镜像和Docker容器是如何分层的。镜像层就是lowerdir,容器层是upperdir。暴露在外的统一视图就是所谓的merged。

当Docker 运行在overlay/overlay2存储驱动上时,需要d_type特性的支持才能正常工作,Docker1.13以后加入了对此的检查,可以运行docker info命令来查看文件系统是否支持d_type这个特性。

如果overlayfs存储驱动不支持d_type的话,容器在操作文件系统时可能会出现一些奇怪的错误:比如在bootstrap的时候出现Chown error,或者rebuild时发生错误等等。
如何解决?
坏消息是只能通过重做文件系统来解决,是不能在已经存在的操作系统上进行修改的哦!!!
下面是基本上可行的步骤:
(1)备份你的数据
(2)重新创建你的文件系统,当然可以是使用XFS,也可以使用Ext4
(3)恢复备份的数据回来
针对第二点,我们可以有如下操作(做下面命令之前最好了解下命令可能带来的影响:):
如果是使用ext4文件系统,那么命令是:

mkfs.ext4 /path/to/your/device

如果是使用xfs文件系统,那么命令是:

mkfs.xfs -n ftype=1 /path/to/your/device
现在您就可以检查下RHEL/CentOS7是否存在d_type问题:
sudo xfs_info /
meta-data=/dev/sda3 isize=256 agcount=4, agsize=32230848 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0 spinodes=0
data = bsize=4096 blocks=128923392, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=62950, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
像我这台机器就是ftype=0,如果计划加入到Docker节点的话,需要进行调整哦!

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.2_release_notes/technology-preview-file_systems

Docker Warning : the backing xfs filesystem is formatted without d_type support的更多相关文章

  1. docker WARNING: IPv4 forwarding is disabled 问题解决

    问题: [yuyongxr@localhost ~]$sudo docker run -d --name nginx -p : nginx WARNING: IPv4 forwarding is di ...

  2. docker WARNING: IPv4 forwarding is disabled. 解决方法

    WARNING: IPv4 forwarding is disabled. Networking will not work. 在宿主机添加如下信息 echo net.ipv4.ip_forward= ...

  3. docker WARNING: bridge-nf-call-iptables is disabled 处理

    在CentOS中 vim /etc/sysctl.conf net.bridge.bridge-nf-call-ip6tables = net.bridge.bridge-nf-call-iptabl ...

  4. docker使用常见问题解决方案:错误号码2058,docker WARNING :IPv4,容器间的通讯

    1.错误号码2058 1,错误解决: 解决方法:docker下mysql容器 登录 mysql -u root -p 登录你的 mysql 数据库,然后 执行这条SQL: ALTER USER 'ro ...

  5. docker warning ipv4 forwarding is disabled. networking will not work

    # vi /etc/sysctl.conf 添加如下代码:     net.ipv4.ip_forward=1 重启network服务 # systemctl restart network   查看 ...

  6. docker部署mysql远程连接 解决1251 client does not support ..

    现象:用虚拟机上Docker启动mysql之后无法在本地安装的navicat上远程连接已启动的mysql,错误截图: 原因:mysql 8.0 默认使用 caching_sha2_password 身 ...

  7. docker 基础之操作容器

    Docker子命令分类 Docker 环境信息 info .version 容器生命周期管理 Create.exec.kill.pause.restart.rm.run.start.stop.unpa ...

  8. docker 启动失败

    今天本来想抽空弄一下openshift,新装了个centos结果docker起不来. 报错内容: [root@master docker]# systemctl status docker.servi ...

  9. docker容器启动几分钟之后自动退出

    2018-11-06 问题: docker容器启动几分钟之后自动退出 log日志报错 WARNING: overlay2: the backing xfs filesystem is formatte ...

随机推荐

  1. python3 关联规则Apriori代码模版

    #!/usr/bin/env python3 # -*- coding: utf-8 -*- from numpy import * def loadDataSet(): return [['a', ...

  2. javascript 判断空数组

    javascript里判断空数组不能用 []==[] 这样来判断,因为数组也是个对象,普通对象通过指针指向的内存中的地址来做比较 所以 []==[]结果为false,因此判断数组是否为空 用 [].l ...

  3. Web api 访问HttpContext

    HttpContext context; Request.Properties.TryGetValue<HttpContext>("MS_HttpContext", o ...

  4. java程序调优系列(一)intern()代替equal()

    1. 首先String不属于8种基本数据类型,String是一个对象. 因为对象的默认值是null,所以String的默认值也是null:但它又是一种特殊的对象,有其它对象没有的一些特性. 2. ne ...

  5. PG自动化测试

    安装软件包 yum groupinstall "Development Tools" yum install zlib-devel tcl-devel readline-devel ...

  6. IOS学习计划

    自从接触了IOS后,都没有像样的写过一篇博客去总结这近三个月来对IOS开发的了解.今天,趁着有那么一点的时间,写一下接下来的学习计划和学习路线,以便于自己今后接下来的时间可以更有方向感,更有效率的去学 ...

  7. strongswan

    StrongSwan is an open source IPsec-based VPN Solution. It supports both the IKEv1 and IKEv2 key exch ...

  8. Spring NamedParameterJdbcTemplate 详解

    转自: https://zmx.iteye.com/blog/373736 NamedParameterJdbcTemplate类是基于JdbcTemplate类,并对它进行了封装从而支持命名参数特性 ...

  9. 跟我学算法-opencv加载,修改,保存

    #include<opencv2/opencv.hpp> #include<iostream> #include<math.h> using namespace c ...

  10. MathExamLv2——周世元211606348,许燕婷211606338

    结对编程 211606348 周世元 211606338 许燕婷 一.预估与实际 PSP2.1 Personal Software Process Stages 预估耗时(分钟) 实际耗时(分钟) P ...