OMV on Raspberry and SD Card full!

  • Code
    pi@NAS:~ $ sudo cat /etc/docker/daemon.json
    {
      "data-root": "/srv/dev-disk-by-id-usb-WDC_WD10_EARS-00Y5B1_152D00539000-0-0-part2/omv/docker/dockerroot"
    }


    Portainer now appears not to be installed:




    Is Portainer installed in the Docker folder? could the Portainer installation have a cross reference to the old Docker path?

    openmediavault 5.5.0-1

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 4TB HDD

  • What did you change?

    on the cli: docker ps -a to see if docker finds the containers.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Code
    pi@NAS:~ $ sudo docker ps -a 
     CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
    pi@NAS:~ $

    seems to find nothing

    openmediavault 5.5.0-1

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 4TB HDD

  • What did you change between working / not working?


    Stop the daemon,

    remove /var/lib/docker

    create the link again to the right /srv/.../dockerroot


    Start daemon and check for containers.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • deleted folder and re-created the symlink.


    at the first start the docker, perhaps it does not yet have access to the USB disk and does not load Portainer ... from the OMV IU I have restarted the Docker and loaded the Portainer, but .... the empty one seems to be loaded ....


    Code
    pi@NAS:~ $ sudo docker ps -a
    CONTAINER ID   IMAGE                    COMMAND        CREATED       STATUS              PORTS                                                      NAMES
    d0bed84d9846   portainer/portainer-ce   "/portainer"   2 hours ago   Up About a minute   0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp   portainer
    pi@NAS:~ $






    do i have way to recover from docker.backup?

    openmediavault 5.5.0-1

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 4TB HDD

  • Did you delete the newly created /var/lib/docker or the one on /srv/...?


    I think it is time to go back to initial state and restart tomorrow.


    To get back to initial state:

    • shut down docker daemon
    • Edit the docker storage in the UI to /var/lib/docker, press save / apply
    • check that /etc/docker/daemon.json has data-root: "/var/lib/docker"
    • cd /var/lib
    • mv docker docker.defunc
    • rsync -aHv docker.backup/ docker  (watch the slash in first path)
    • ls -l docker and check is files are as expected
    • Restart docker using the ui
    • Check the containers
    • remove the docker.defunc
    • remove the dockerroot on /srv

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • ok, initial state restored. :)

    tomorrow evening I'll calmly redo the procedure.


    Meanwhile, thanks for the support :thumbup:

    openmediavault 5.5.0-1

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 4TB HDD

  • Another option would be to create docker-compose.yml files from all the containers (before changing the directory)and paste that into portainer later (after changing the directory, without any migration)


    This would avoid all the trouble of migrating the containers.


    Code
    cd
    mkdir -p compose-files
    cd compose-files
    for i in $( docker ps -a --format "{{ .Names }}"); do  docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose $i >> $i.docker-compose.yml; done
    ls -l

    This will create one docker-compose.yml file for each container.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Hello, new attempt.

    I stopped the docker service, but I'm not 100% sure:

    Code
    pi@NAS:~ $ sudo systemctl stop docker
    Warning: Stopping docker.service, but it can still be activated by:
      docker.socket
    pi@NAS:~ $

    in fact:



    but soon after:


    Portainer is running; do I have to stop the portainer container too?

    openmediavault 5.5.0-1

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 4TB HDD

  • Does the docker drop down allow to stop thew daemon? I am not at my OMV system, so can not check.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

    • Official Post

    Another option would be to create docker-compose.yml files from all the containers (before changing the directory)and paste that into portainer later (after changing the directory, without any migration)


    This would avoid all the trouble of migrating the containers.


    Code
    cd
    mkdir -p compose-files
    cd compose-files
    for i in $( docker ps -a --format "{{ .Names }}"); do  docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose $i >> $i.docker-compose.yml; done
    ls -l

    This will create one docker-compose.yml file for each container.

    That's a pretty slick tool. I've heard of it before but never really tried. Gonna have to do some testing with that.


    Alternatively you can do individual containers...

    Code
    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose "CONTAINER NAME OR ID"

    It just puts the compose file right on screen, and you can just copy/paste it to a text file rather than printing every container you have to a compose file (although that would be handy if you were getting ready to do a reinstall and wanted to backup all your containers as they were currently configured.


    Thanks

  • So removing instead of stopping is the way to go.

    forgive the questions, but I have to make sure I don't lose the data ...


    will uninstalling the docker delete the folder?

    should I first rename the folder to docker.backup?

    openmediavault 5.5.0-1

    Raspberry Pi 4 Model B 4GB RAM + MicroSD 32GB Samsung UHS-I

    FANTEC QB-35US3-6G Usb 3.0 Box Case + 1TB HDD + 2TB HDD + 4TB HDD

Participate now!

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