2018-11-06
问题:
docker容器启动几分钟之后自动退出
log日志报错
WARNING: overlay2: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior
查看docker信息
[root@localhost ~]#docker info Containers: 25 Running: 6 Paused: 0 Stopped: 19 Images: 13 Server Version: 18.03.1-ce Storage Driver: overlay2 Backing Filesystem: xfs Supports d_type: false Native Overlay Diff: false Logging Driver: json-file WARNING: overlay2: 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. WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled
查看系统文件支持类型
$ xfs_info / meta-data=/dev/sda1 isize=256 agcount=4, agsize=3276736 blks = sectsz=512 attr=2, projid32bit=1 = crc=0 finobt=0 spinodes=0 data = bsize=4096 blocks=13106944, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 #这个ftype=0的话,容器会出现各种问题,我的是容器自动退出 log =internal bsize=4096 blocks=6399, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0
问题解决
知道问题点后,还是能搜出点解决经验的
https://blog.csdn.net/liukuan73/article/details/77986139
解决方案,备份,加参数重新格式化,恢复
mkfs.xfs -n ftype=1 /path/to/your/device
注:(此方法本人未验证)