鍍金池/ 問(wèn)答/Linux/ 安裝docker后報(bào)錯(cuò),xfs文件系統(tǒng),ftype如何開(kāi)啟?

安裝docker后報(bào)錯(cuò),xfs文件系統(tǒng),ftype如何開(kāi)啟?

問(wèn)題描述

我通過(guò)shell安裝docker-ce

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

安裝成功后,我啟動(dòng),并運(yùn)行

docker info

出現(xiàn)問(wèn)題

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.

環(huán)境

docker版本是

Server Version: 17.09.0-ce

系統(tǒng)版本是

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

探索

然后我谷歌百度后,得出的結(jié)果是centos7之后,默認(rèn)的文件系統(tǒng)是xfs文件系統(tǒng),然而我xfs中的ftype沒(méi)有開(kāi)啟,上面顯示為0,我想把他開(kāi)啟,該如何開(kāi)啟,網(wǎng)上表示

mkfs.ext4 /path/to/your/device

這個(gè)命令好像可以,但是我執(zhí)行了

mkfs.ext4 /
和
mkfs.ext4 /vagrant

都不行ftype還是等于0
當(dāng)然如果你有更好的解決方法也告訴我一下!

參考的資料:http://blog.csdn.net/liukuan7...

回答
編輯回答
安于心

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

2018年4月5日 18:48
編輯回答
落殤

可以看出來(lái),這個(gè)版本的centos不支持selinux 打開(kāi)docker的配置文件,/etc/sysconfig/docker 在“OPTIONS='--selinux-enabled”后加“=false”,其余不變,保存退出。
轉(zhuǎn) https://www.codetd.com/articl...

2018年1月28日 11:42