Docker containers show as exited after changing storage location

  • Hey there, Sorry for the double post. I thought it'd be better to create a dedicated thread for my issue.

    I moved my docker base folder to another drive, but it didn't work correctly.

    I have two docker folders. The main docker storage folder and one for my containers external data, eg plex data.


    The external apps data folder works fine and I haven't moved it. But after I moved the docker folder and reinstalled docker etc, I had to reinstall Portainer to gain access. When I log in all my other containers show as exited and won't start. There's also no "Edit Container" button where I can fix things.


    I'm assuming there's more directory settings that need updating for the individual containers, but I'm not sure where to look.


    Any help would be amazing.

    Thanks B :)

    • Offizieller Beitrag

    We’re the containers installed from the command line or as stacks in Portainer?

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • I created them under containers in Portainer. I pulled the images and set them up etc. I have 0 stacks in Portainer. I've never had any stacks in Portainer :/


    I put the storage location back and everything is working again. But when I change to the new storage directory, they all exit, but Portainer still works with the new directory :/

    • Offizieller Beitrag

    Your containers don't know where the new docker folder is yet. How many containers do you have? You might start out with the simplest container, take some notes/screenshots and then delete the container and recreate it from scratch and see if it works. There is a way to redirect the containers to the new docker location, but I think this low tech solution might be easier for you.

    • Offizieller Beitrag

    I created them under containers in Portainer. I pulled the images and set them up etc. I have 0 stacks in Portainer. I've never had any stacks in Portainer :/


    I put the storage location back and everything is working again. But when I change to the new storage directory, they all exit, but Portainer still works with the new directory :/

    In this order


    Stop docker service:

    Code
    systemctl stop docker

    Move docker folder to new location


    Go to webUI of OMV.. System/omv-extras/docker

    Put the new path there and CLICK SAVE (this is critical)


    Click Install Docker. This will not reinstall docker, it will simply update the configs with the new path, and restart the docker service.


    Verify docker is looking at the new path:


    Code
    docker info | grep Root


    Your containers don't care where the docker folder is. They look where the docker daemon tells it to look. Now if you're moving your container volumes (ie, the paths you're putting in your stacks), that's another issue, but it doesn't sound like what you're doing

  • KM0201, that's exactly what I did following instructions in another thread here: Move docker storage location - Docker - openmediavault

    Anyhow, I will try again and see if I have better luck.

    Just to be clear though. I have two folders to move. There is the docker base folder, and the storage folder where the images are being created.
    I'm not sure why I have two folders. It was so long ago when I started using docker :/

  • baldman

    Hat den Titel des Themas von „Docker containers show as exited after changing storage loction“ zu „Docker containers show as exited after changing storage location“ geändert.

Jetzt mitmachen!

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