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
Docker containers are losing config after server restart
-
-
mrkonyk
Added the Label OMV 5.x -
In your container configurations what Restart Policy are you using?
-
I'm using Unless stopped on all containers. Thanks for the quick reply
-
-
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.
-
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)
-
-
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%
-
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.
-
-
-
This direct to my post?
-
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.
-
-
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!