overlay2需要高内核支持,低内核使用overlay
1. 开启文件系统 ftype
umount /dev/mapper/centos-home //device的路径可以在xfs_info中找到
//如果提示device is busy
umount -l /dev/mapper/centos-home //强制卸载同时要重启
mkfs.xfs -n ftype=1 /dev/mapper/centos-home //重新格式化device,在此
mount /dev/mapper/centos-home /home //重新挂载
xfs_info /home //查看结果
2. Docker 配置指定 storage-driver
cat /etc/docker/daemon.json
{
"storage-driver":"overlay2",
"data-root":"/data/docker/lib",
"exec-root":"/data/docker/run",
"registry-mirrors": ["https://mirror.ccs.tencentyun.com","http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"]
}
发表评论 取消回复