Delay docker service start till specific HD is mounted

  • I've the problem that docker starts before one of my HDs is coming up. Unfortunately my media is stored on that device. Means this renders my media inacessible by emby till I restart docker. So here is my solution to fix that. However I guess that one has to do that fix after every OMV update.


    - Best is to have your media in a shared folder.
    - Now open a root console
    - list all mounts

    Code
    systemctl list-unit-files | grep ".mount"



    Search for your shared folder/ discs name. In my example it's


    Code
    sharedfolders-\x40Media.mount

    now edit



    Code
    nano /etc/systemd/system/docker.service.d/openmediavault.conf

    and at the bottom add (modify and add the found shared folder name):

    Code
    [unit]
    After=The_shared_folder_we_found_before

    If someone knows a better, persistent way... I'd be glad to hear it.

  • Hi,


    I've run into the same issue and ended up adding a scheduled job via the omv UI to run at reboot which sleeps for 30 seconds and then restarts docker


    Bash
    sleep 30; systemctl restart docker



    It may survive an upgrade/update, but still hoping for a cleaner 'fix'

  • I just realized that i have the same issue... is there a command to delay the start of the whole docker service?


    alternatively i want to start a few images a bit delayed and prefer not to do a restart

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!