[英]'overlay2' is not supported over nfs" storage-driver=overlay2
[英]How to fix docker storage-driver=overlay2 problem
我需要將 Proxmox LXC Debian Buster 容器的底層存儲從 RAW 更改為 ZFS。 為此,我將快照恢復到 ZFS 存儲。 這對於容器中的操作系統通常是透明的,但在這種情況下 docker 不再啟動。
最初的問題是 docker 沒有啟動,經過一番挖掘后我發現了這個:
# dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
INFO[2021-08-03T09:24:40.909844803Z] Starting up
...
ERRO[2021-08-03T09:24:56.914420548Z] failed to mount overlay: invalid argument storage-driver=overlay2
ERRO[2021-08-03T09:24:56.914439880Z] [graphdriver] prior storage driver overlay2 failed: driver not supported
failed to start daemon: error initializing graphdriver: driver not supported
我怎樣才能解決這個問題?
編輯:我嘗試了建議的修復方法,但仍然沒有雪茄:
root@mail:/var/log# systemctl status docker.service
* docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-10-09 10:05:49 UTC; 1min 23s ago
Docs: https://docs.docker.com
Process: 236 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 236 (code=exited, status=1/FAILURE)
Oct 09 10:05:49 mail systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Oct 09 10:05:49 mail systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Oct 09 10:05:49 mail systemd[1]: Stopped Docker Application Container Engine.
Oct 09 10:05:49 mail systemd[1]: docker.service: Start request repeated too quickly.
Oct 09 10:05:49 mail systemd[1]: docker.service: Failed with result 'exit-code'.
Oct 09 10:05:49 mail systemd[1]: Failed to start Docker Application Container Engine.
提供的鏈接建議在容器中創建一個新的 zpool。 似乎有必要這樣做有點矯枉過正,不是嗎?
配置Docker使用zfs。 編輯/etc/docker/daemon.json
並將存儲驅動程序設置為 zfs。 如果文件之前是空的,現在應該是這樣的:
{
"storage-driver": "zfs"
}
更多詳細信息: https://docs.docker.com/storage/storagedriver/zfs-driver/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.