Is your docker also corrupt after a reboot? (OMV5, Pi4) This might fix it!

  • I stumbled upon this topic because I have the same issue.


    I've ran the following command

    sudo systemctl edit docker.service is the proper way to add overrides/changes...

    and added this to the file

    [Service]

    ExecStartPre=/bin/sleep 30

    StartLimitInterval=300s

    will this fix the issue at hand?


    omv-extras writes the waitLocalFs.conf. So, I wouldn't change that one. And instead of delay, delete all of the files in /etc/systemd/system/docker.service.d/ and try the following (as root):


    Code
    cat <<EOF > /etc/systemd/system/docker.service.d/waitAllMounts.conf
    [Unit]
    After=local-fs.target $(systemctl list-units --type=mount | grep /srv | awk '{ print $1 }' | tr '\n' ' ')
    EOF

    If that works, I will change omv-extras to use that code.

    Here you suggest something to somebody else. Is this something I can try and might have the same effect as the 1st option that I did?

  • will this fix the issue at hand?

    Try it.


    Is this something I can try and might have the same effect as the 1st option that I did?

    Of course you can try it. I don't have a setup that can test everyone's setup to know if any of these things work. If they work for you, great. I don't think you should have to use both options but if that is the only thing that works, then use it.

    omv 5.5.9 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Of course you can try it. I don't have a setup that can test everyone's setup to know if any of these things work. If they work for you, great. I don't think you should have to use both options but if that is the only thing that works, then use it.

    Had solution 1 not working the 1st time but forgot to start the drives so...my bad. 2nd shutdown and startup appears to have worked.


    I've also tryed your solution. Removed all files in /etc/systemd/system/docker.service.d/ and ran the commands as root. I notice it takes longer for docker and the containers to restart about double as long as solution 1.


    Is it correct that solution 1 will always start after 30 seconds, even if the drives are not fully loaded and that your solution will wait for a full startup before starting docker? If so, I prefer your solution as from a programmers perspective, your solution is the preferred one.


    I'll leave this here too.

    If you can't get solution 2 to work due to being unable to log in as root and adding sudo in front ot cat ... does not work, login as your normal user (pi for me) and run sudo -i to go into root user, run the 4 lines from solution 2 and press Ctrl+D to exit back to your user.

  • Is it correct that solution 1 will always start after 30 seconds, even if the drives are not fully loaded and that your solution will wait for a full startup before starting docker?

    Yep. That is why I was opposed to using a time instead of actually waiting for the drives. Unfortunately, my solution doesn't self update if you add/change the drives in the system.

    omv 5.5.9 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!