Hi guys,
I just did a fresh, clean install of OMV5 on Raspberry Pi 4 with a WD external USB3 Hard Drive as storage. Everything works perfectly, as a charm!
Only issue I had, was that after a reboot, Docker became corrupt and running docker or docker-compose commands failed with weird errors about network, or layers not existing.
I think it has something to do with the docker data moved to the USB3 HD, and that the data was not available at the time of Docker init. So, to fix it, I delayed the docker initialization with 30 sec:
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStartPre=/bin/sleep 30
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=300s
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not support it.
# Only systemd 226 and above support this option.
TasksMax=infinity
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target
Display More
Note, the only important line to change is line 14, the actual delay. You also might want to increase line 28, the StartLimitInterval. I chose 300 sec.
Now, everything works as expected. After a reboot, Docker is usable without manual restart, and it also restarts your containers properly (given you have set the proper restart policies in the containers).