Аfter restarting OVM, Docker is loaded with empty containers

  • Good day!

    Please help with this problem:


    There is Raspberry PI with the installed OVM + Docker + Portainer. An external disk1 120GB is connected to Raspberry PI (SSD is installed on it with PiOS) and disk2 (8TB - movies, music, etc.).

    The appdata folder with the configs of all docker containers is located on disk2 - /srv/dev-disk-by-label-8TB/appdata

    If you turn off disk2 and reboot the OVM, then the system will still have a path, but this is no longer disk2, but disk1 - /srv/dev-disk-by-label-8TB/appdata (the path is the same) and there will also be folders with container configs - only with different settings (for example, the Jackett will have a different API key). While disk2 is connected, there is no access to the disk1 appdate folder to delete folders, etc.

    Sometimes after rebooting the OVM (disk1 and disk2 are connected) - the docker is loaded with containers from the folder of disk1, not disk2 ..... if in the OVM you press "restart docker" then the docker will restart and connect the correct folder of the appdate from disk2 and the containers will work with the correct settings.


    Question:

    1)      how to make Docker always launch containers from disk2 appdate folder??

    Disconnect disk2 and delete the folder from disk1? will that be enough or will Docker create a folder there again?


    2)      Can replace the path in all containers

    instead

    /srv/dev-disk-by-label-8TB/appdata

    on (uuid disk2)

    /srv/dev-disk-by-uuid-bd28a674-8750-d9ff-4b65-e34ae789ac36

    and then it will definitely run from disk2


    3)      Or can it be correct to transfer the folder appdata of the container config files to disk1? Will SSD die faster then?

  • Hello


    When I set up my docker containers on my old OMV I done this in the same way you have mentioned in point 2 and had no issues.


    I now run OMV in raid 1 on 2 SSD's and fully run docker including the appdata off them. In fact my appdata has always run on SSD's.


    Hope this helps.

    There are 10 types of people in the world. Those who understand binary and those who don’t.

  • I assume the problem is, that the USB drive is not ready, when docker starts. That is why it works, if you manually restart the docker.


    Here is a potential fix:

    RE: Jellyfin portainer stack completely reset after 10-hour server shutdown: why?

  • I assume the problem is, that the USB drive is not ready, when docker starts. That is why it works, if you manually restart the docker.


    Here is a potential fix:

    RE: Jellyfin portainer stack completely reset after 10-hour server shutdown: why?

    Hi! It seems it helped - thanks!



    I'll try this too, but a little later. Thank!

Participate now!

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