cat /etc/docker/daemon.json
OMV on Raspberry and SD Card full!
-
- OMV 5.x
- Yield79
-
-
Do not copy again the copy should be ok.
-
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?
-
-
What did you change?
on the cli: docker ps -a to see if docker finds the containers.
-
-
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.
-
-
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 ....
Codepi@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?
-
-
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
-
-
ok, initial state restored.
tomorrow evening I'll calmly redo the procedure.
Meanwhile, thanks for the support
-
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.
Codecd 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.
-
-
-
Does the docker drop down allow to stop thew daemon? I am not at my OMV system, so can not check.
-
-
So removing instead of stopping is the way to go.
-
-
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.
Codecd 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...
Codedocker 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?
-
If you feel safer you can first copy the directory.
-
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!