我在安装了 Docker 的 AKS 集群中运行 GitHub 代理。我可以使用 VFS 存储驱动程序成功运行它,但是我想使用 Overlay 2,因为它更快。 我收到以下消息:
sudo dockerd &
...
INFO[2021-06-12T22:38:41.674415376Z] containerd successfully booted in 0.029163s
INFO[2021-06-12T22:38:41.692284696Z] parsed scheme: "unix" module=grpc
INFO[2021-06-12T22:38:41.692316597Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-06-12T22:38:41.692340397Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-06-12T22:38:41.692352097Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-06-12T22:38:41.693462211Z] parsed scheme: "unix" module=grpc
INFO[2021-06-12T22:38:41.693484611Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-06-12T22:38:41.693505611Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-06-12T22:38:41.693519612Z] ClientConn switching balancer to "pick_first" module=grpc
ERRO[2021-06-12T22:38:41.702131518Z] failed to mount overlay: invalid argument storage-driver=overlay2
INFO[2021-06-12T22:38:41.702558423Z] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
INFO[2021-06-12T22:38:41.702674724Z] stopping healthcheck following graceful shutdown module=libcontainerd
failed to start daemon: error initializing graphdriver: driver not supported
我的 /etc/docker/daemon.json 设置:
{
"storage-driver": "overlay2",
"storage-opts": [
"overlay2.override_kernel_check=true"
]
}
文件系统类型:
Filesystem Type Size Used Avail Use% Mounted on
overlay overlay 49G 20G 29G 41% /
tmpfs tmpfs 64M 0 64M 0% /dev
tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 ext4 49G 20G 29G 41% /etc/hosts
shm tmpfs 64M 8.0K 64M 1% /dev/shm
tmpfs tmpfs 3.9G 12K 3.9G 1% /run/secrets/kubernetes.io/serviceaccount
内核版本:5.4.0-1046-azure
答案 0 :(得分:1)
overlay overlay 49G 20G 29G 41% /
从文件系统来看,您似乎是在容器中运行。使用 Docker-in-Docker,通常您会在 /var/lib/docker 上安装一个卷,以从容器的覆盖文件系统中获取 docker 文件系统,因为您无法在覆盖之上进行覆盖。 docs on storage driver backing filesystems 显示每个存储驱动程序支持的底层文件系统。
如果你不能为 docker 实现卷挂载,那么你只能使用 vfs,它可以在任何地方工作但非常占用磁盘(整个文件系统都为每一层复制),或者通常用于的 fuse-overlayfs rootless 安装,可能不适用于您的用例。