56 lines
No EOL
1.5 KiB
Markdown
56 lines
No EOL
1.5 KiB
Markdown
** docker使用overlay2无法启动 **
|
|
docker配置如下:
|
|
```bash
|
|
cat /etc/docker/daemon.json
|
|
```
|
|
```json
|
|
{
|
|
"exec-opts": ["native.cgroupdriver=systemd"],
|
|
"storage-driver": "overlay2",
|
|
"storage-opts": [
|
|
"overlay2.override_kernel_check=true"
|
|
],
|
|
"log-driver": "json-file",
|
|
"log-opts": {
|
|
"max-size": "100m",
|
|
"max-file": "3"
|
|
}
|
|
}
|
|
```
|
|
报错提示如下:
|
|
```
|
|
Mar 04 18:16:16 harbor.scm.360.back kernel: overlayfs: upper fs needs to support d_type.
|
|
Mar 04 18:16:16 harbor.scm.360.back dockerd[3726]: failed to start daemon: error initializing graphdriver: 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. Backing filesystems without d_type support are not supported.
|
|
Mar 04 18:16:16 harbor.scm.360.back systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
|
|
Mar 04 18:16:16 harbor.scm.360.back systemd[1]: Failed to start Docker Application Container Engine.
|
|
-- Subject: Unit docker.service has failed
|
|
-- Defined-By: systemd
|
|
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
|
|
--
|
|
-- Unit docker.service has failed.
|
|
--
|
|
-- The result is failed.
|
|
```
|
|
使用命令
|
|
```
|
|
xfs_info /
|
|
```
|
|
打印的信息中
|
|
|
|
** ftype=0 **
|
|
|
|
除非重新格式化硬盘,不然无法使用
|
|
|
|
|
|
** 修改配置文件 **
|
|
```json
|
|
{
|
|
"exec-opts": ["native.cgroupdriver=systemd"],
|
|
"storage-driver": "devicemapper",
|
|
"log-driver": "json-file",
|
|
"log-opts": {
|
|
"max-size": "100m",
|
|
"max-file": "3"
|
|
}
|
|
}
|
|
``` |