安装docker后报错,xfs文件系统,ftype如何开启?

问题描述

我通过shell安装docker-ce

curl -fsSL https://get.docker.com/ | sh -s -- --mirror Aliyun

安装成功后,我启动,并运行

docker info

出现问题

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.

环境

docker版本是

Server Version: 17.09.0-ce

系统版本是

centos7.4

xfs详情

[root@12 ~]# xfs_info /
meta-data=/dev/mapper/centos-root isize=256    agcount=4, agsize=549120 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=2196480, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

探索

然后我谷歌百度后,得出的结果是centos7之后,默认的文件系统是xfs文件系统,然而我xfs中的ftype没有开启,上面显示为0,我想把他开启,该如何开启,网上表示

mkfs.ext4 /path/to/your/device

这个命令好像可以,但是我执行了

mkfs.ext4 /
和
mkfs.ext4 /vagrant

都不行ftype还是等于0
当然如果你有更好的解决方法也告诉我一下!

参考的资料:http://blog.csdn.net/liukuan7...

阅读 18.1k
3 个回答

mkfs.xfs -n ftype=1 /path/to/your/device

新手上路,请多包涵

可以看出来,这个版本的centos不支持selinux 打开docker的配置文件,/etc/sysconfig/docker 在“OPTIONS='--selinux-enabled”后加“=false”,其余不变,保存退出。
https://www.codetd.com/articl...

将挂载的device卸载
umount /dev/mapper/centos-root //device的路径可以在xfs_info中找到
//如果提示device is busy
umount -l /dev/mapper/centos-root //强制卸载同时要重启

重新格式化,并再次挂载
mkfs.xfs -n ftype=1 /dev/mapper/centos-root
像这样的命令没法执行怎么办???(找不到这个path)
关键是要系统文件的类型为ftype=1才行

注意:我是在虚拟机上执行的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题