Docker containers are losing config after server restart

  • After I restart my server all apps are back to default. Once I go into portainer and restart all containers everything comes back. Is it a permission problem? Sorry bit of a noob

  • mrkonyk

    Hat das Label OMV 5.x hinzugefügt.
  • In your container configurations what Restart Policy are you using?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Unplugged my backup drive from server and rebooted, everything worked perfectly! Looks like that was the problem. Think I'm still going to move config files to servers SSD for quicker access.

  • I have the same issue, due to the file system taking longer to mount then docker starting on startup. I'm trying to find the correct way to delay the docker startup to give the filesystem chance to load first.

    OMV 5 - 64 bit
    Dell T430, 16gb Ram, 5 x 3TB HDD Raid5, 1 x 120GB 2.5" SSD (OS)

  • I can confirm that. My BTRFS RAID sometimes seems not yet ready when Nextcloud and Plex started. I am using a simple Startup Script that restarts the affected containers after 30 seconds. (Execution setup via OMV -> Scheduled Jobs)



    Bash
    #!/bin/bash
    
    # Wait for startup
    sleep 30
    
    # After NAS reboot, plex and nextcloud have problems accessing data dirs. Workaround delayed container restart
    docker restart nextcloud
    docker restart plex
    
    echo "Startup script executed!"
    • Offizieller Beitrag

    Unplugged my backup drive from server and rebooted, everything worked perfectly! Looks like that was the problem. Think I'm still going to move config files to servers SSD for quicker access.

    Typically when this happens, its because the docker service is starting before the drive with your config (or data) is mounted... so basically docker detects this as nothing being there. Very common issue when people have their config files on a merged filesystem.


    Not sure why your backup drive would cause this. Putting them on another drive (or a drive that isn't external) can fix this. An easy way to verify this is your problem, simply hook your external up, boot the server, and assuming docker starts "empty", simply SSH your server and run the command


    systemctl restart docker


    Once docker is completely restarted, you should have full access to your containers. A lot of users have taken to setting up scripts, etc.. that just restarts docker 30sec after a boot (as the poster above did) and that would work as well so long as you're not the type to sit with a stop watch to see how long it takes your server to be up 100%

  • is the official fix. As my disks are internal to the Dell server I run connected to the backplane of the T430 but the server just starts faster then what the filesystem does I thought I saw one of the other mods mention a system config file that could be edited to fix it but can't find the thread now.

    OMV 5 - 64 bit
    Dell T430, 16gb Ram, 5 x 3TB HDD Raid5, 1 x 120GB 2.5" SSD (OS)

    • Offizieller Beitrag

    his direct to my post?

    yes, do this:

    I thought I saw one of the other mods mention a system config file that could be edited to fix it but can't find the thread now.

    In the thread I linked ryecoaaron gives the command to edit a systemd service file by creating an override file. And the first post proposes a modification for the delayed start of docker.

    So I though this is what you had in mind.

  • yes, do this:

    In the thread I linked ryecoaaron gives the command to edit a systemd service file by creating an override file. And the first post proposes a modification for the delayed start of docker.

    So I though this is what you had in mind.

    Cheers will have a look and give it a try.

    OMV 5 - 64 bit
    Dell T430, 16gb Ram, 5 x 3TB HDD Raid5, 1 x 120GB 2.5" SSD (OS)

Jetzt mitmachen!

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