All containers reset after a system restart

  • this morning I wanted to create an image of my install for backup, I run OMV5 on a 32gb thumb drive, so I shut the system down and connected the os drive (thumb drive) to my pc and used win32disk to create the image (like I've done multiple times) and then put it back in my nas and powered it back on, everything seemed to boot up fine until I started to check my containers and all of them load like they are fresh installs and need to be configured.


    when I setup docker after doing a clean install of OMV5 about 6 months ago I changed the docker directory to one of the HDD instead of the thumb drive using the GUI to do so. I have restarted the server multiple times since then with no issues, earlier this week I did a fresh install of OMBI V4.


    I noticed that the size on my thumb drive had gone up about 3% so I thought that docker was being written to my thumb drive again so I tried out both options in this thread incase docker was starting before the HDD where mounted and neither one of them worked

    Is your docker also corrupt after a reboot? (OMV5, Pi4) This might fix it!


    while doing the second option above I used Winscp to navigate to var/lib/docker to see if there was a docker folder, I could not find the docker folder


    I then checked for updates and installed them all, I checked the containers and still no change

    then restarted to make sure and still no change


    UPDATE: I just used Winscp to look through the sharedfolders and I opened my containers folder and there is only one container folder in there but if I use windows explorer to navigate to the same folder it's showing all the containers and docker folders and content are still there. I'm even more confused now ignore, I realized I was looking in the wrong path :rolleyes:


    I've hit a wall and I'm not sure where to go from here, please help

  • I did some more digging and looked at


    /etc/docker/daemon.json


    the daemon.json shows the correct folder path


    Code
    {
    "data-root": "/srv/dev-disk-by-label-8TB1/Appdata/docker"
    }


    I checked /srv/dev-disk-by-label-8TB1/Appdata/docker and all containers and the docker folder are their, but all my dockers act like fresh installs.

  • they are stored on one of my HDD


    srv/dev-disk-by-label-8TB1/Appdata

    Do the containers have permission to write there?

    --
    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.

  • the permissions worked before, I'm not sure what they are set too(not sure how to check them) I didn't change any of the permissions so I'm not sure how they could have changed, sorry I'm a noob with a lot of this

    • Offizieller Beitrag

    the permissions worked before, I'm not sure what they are set too(not sure how to check them) I didn't change any of the permissions so I'm not sure how they could have changed,

    Put it into prospective. "Something happened" and that might include a permission change. Dockers do weird things if not configured correctly.

    If you're not sure how to look at permissions, WinSCP might be of help. If you're not sure of what WinSCP is, look -> here on page 57.

  • Thanks for the tip, I didn't think to use WinSCP to check the permissions, looking at the folders this is what I found


    /srv/dev-disk-by-label-8TB1 = 2777, unchecked: Set UID, Sticky bit


    /srv/dev-disk-by-label-8TB1/Appdata = 2777, unchecked: Set UID, Sticky bit (Same as above)


    /srv/dev-disk-by-label-8TB1/Appdata/docker = 0711, unchecked: Group R,W - Others R,W - Set UID, Set GID, Sticky bit



  • I would recursively set /srv/dev-disk-by-label-8TB1/Appdata/docker to 0755

    --
    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.

  • I used WinSCP to change the permission to 0755 recursively and it has thrown an error


    Code
    Error listing directory 'docker/volumes/backingFsBlockDev/
    
    
    No such file or directory.
    Error code 2
    Error message from server: No such file

    options: Abort, Retry, Skip, Skip all, Help


    which should I select?

  • You may be running into a possible unintended consequence of the system switching from mounting drives by label to mounting by UUID.


    Post your /etc/fstab file


    Post a listing of /srv:


    ls -al /srv

    --
    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.

  • /etc/fstab file



    ls -al /srv

  • they still load as fresh installs,



    Not sure if this makes a difference, Portainer still sees all the containers, volumes and networks and the networks still show all the correct containers (this is the same with restarting the system or restarting docker through ssh)

  • It would seem to me that if upon every restart all the containers start from scratch it's because their data is not being stored into a volume outside the containers. This could be because such volumes were never configured or they are in a location the containers can't write to.


    Permissions are one of the most frequently misconfigured things when getting started with docker.


    You have to be able to check these.

    --
    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.

    • Offizieller Beitrag

    they still load as fresh installs,



    Not sure if this makes a difference, Portainer still sees all the containers, volumes and networks and the networks still show all the correct containers (this is the same with restarting the system or restarting docker through ssh)

    If Portainer is seeing the containers, then this is almost certainly a permission issue.

Jetzt mitmachen!

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