Docker Containers Starting on Boot Before Volumes are Mounted

  • Hello all,


    I am using server external USB hard drives on my OMV server, and have several Docker containers that mount various directories stored on the drives. The problem is that when I boot the server, the containers often start before the drives are mounted. Is there any way that I can force the Docker service to wait for the mounting to complete before starting?

  • Maybe you installed omv-extras/docker before this was implemented. But you can retrofit it as described in the post.

    Interesting.


    I'd never seen that solution, I always just suggested the delay script you posted a couple years ago (and have always heard back that it worked perfectly). I'm assuming this would work fine, but I think the delay script might be a more permanent solution given it doesn't self update... Especially since we are talking Pi's and other SBC's which may have drives getting moved around, etc.


    Choices... 1 isn't enough, 2 is to many... :)

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • Interesting.


    I'd never seen that solution, I always just suggested the delay script you posted a couple years ago (and have always heard back that it worked perfectly). I'm assuming this would work fine, but I think the delay script might be a more permanent solution given it doesn't self update... Especially since we are talking Pi's and other SBC's which may have drives getting moved around, etc.


    Choices... 1 isn't enough, 2 is to many... :)

    I made this change and it worked! I don't quite understand what the implications are to deleting the files that ryecoaaron mentions in his post though. I assume that the change was never integrated into OMV-extras though.

  • I made this change and it worked! I don't quite understand what the implications are to deleting the files that ryecoaaron mentions in his post though. I assume that the change was never integrated into OMV-extras though.

    Oh I have no doubt what he said worked... that wasn't the question. Even he mentioned though there's a limitation as it's not going to auto update if drives are removed/added... the delay script doesn't have that limitation.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • Oh I have no doubt what he said worked... that wasn't the question. Even he mentioned though there's a limitation as it's not going to auto update if drives are removed/added... the delay script doesn't have that limitation.

    Ah! Alright. Got it. I do not often add or remove drives, so I'll leave it as it is for now and wait for ryecoaaron to chime in. It would be nice if this change would get added to the omv-extras plugin. Even though the timeout script is the most stable for now, it would be nice to use the drive approach since I would think that it's technically the way you'd want to go about it.

  • It would be nice if this change would get added to the omv-extras plugin.

    I added it a year ago - https://github.com/OpenMediaVa…cdb5127a58cccc19974af6b7e


    All you have to do click install Docker again. This will update the drive list and docker-compose.

    omv 6.0.27-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.0.9 | kvm 6.1.12 | mergerfs 6.1.1 | zfs 6.0.9
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I added it a year ago - https://github.com/OpenMediaVa…cdb5127a58cccc19974af6b7e


    All you have to do click install Docker again. This will update the drive list and docker-compose.

    Oh cool! Sorry about missing that. I did start to poke around the plugin source code to see if I could find it, but I haven't really had enough free time to hunt it down. I regularly reinstall Portainer (since trying to do a container upgrade through the UI does not seem to work), but I don't think I've touched Docker since when I first installed it.


    That's probably the reason we've seen less and less of this problem. Honestly wasn't aware you'd made an effort to resolve that.

    It seems as though good development work always goes on without notice. It's only when there's a problem that everyone starts to pay attention!

Participate now!

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