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

  • 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:

    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).

  • Hi,


    I just registered to say Thank you (you saved many hours) and to suggest this is integrated into the FAQ. I will also try to fill an issue in the docker-gui repo to suggest including this change as an option.

  • I have the same problem.

    I'm a novice in a linux environment, so I apologize in advance for probably trivial questions.


    1) In my docker.service file I don't have the ExecStartPre line; needs to be added? Is it normal that it's not there?


    2) When I try to edit the docker.service file through Putty, I am warned that the file is not writable, so I can't save the changes.


    Thanks

    openmediavault 5.x

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 1TB HDD

  • Probably you are not logged in as "root".

    Add a "sudo" to the line to edit the file with root-super-power.


    sudo nano /lib/systemd/system/docker.service

    of course :D



    I did it!

    I have attempted a reboot and everything seems to be ok!


    Thanks

    openmediavault 5.x

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 1TB HDD

Participate now!

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