My portainer was missing I reinstalled it and now it wants to start a brand new install but I know my container are still there in /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/containers?
Portainer is starting in generic mode.
-
-
Nefertiti
Hat den Titel des Themas von „Portainer start in generic mode“ zu „Portainer is starting in generic mode.“ geändert. -
You need to use the same folder for the /data bind mounting, so that Portainer is using the configuration of your previous installation.
-
On the docker page, Docker storage has always been: :/srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker in both case before and after. Should I change the endpoint ?
I should have mentioned, this happens after reinstalling Nvidia driver to the latest kernel since I am loosing its functionality when the kernel is updating, using the excellent guide [HowTo] Nvidia hardware transcoding on OMV 5 in a Plex docker container
-
-
When you installed Portainer before, did you install using the button in omv-extras? And are you using now also the install button?
Or are you installing from CLI?
-
I always used the button from omv-extras
-
Mhm.
Did you move the docker base path after first installation of Portainer?
i.g. from the default /var/lib/docker to the one you mentioned above?
-
-
yes I did
-
I always used the button from omv-extras
This is one disadvantage of using the button vs docker-compose (unless you change it afterwards)....
Code
Alles anzeigenversion: "2" services: portainer: image: portainer/portainer-ce:latest container_name: portainer volumes: - /NAS/AppData/portainer:/data - /var/run/docker.sock:/var/run/docker.sock - /etc/localtime:/etc/localtime:ro ports: - 8000:8000 - 9000:9000 restart: unless-stopped
Note line 7. This basically means if I ever reinstall Portainer all I have to do is point that "/data" volume at the appropriate folder I've designated for Portainer... and all my stacks, settings, password etc.. is all saved there.
You can do this with the button, but you have to do it after Portainer is installed... the button doesn't allow you to customize an install in this way (and frankly, it shouldn't)
-
yes I did
That's where your containers are stored... not where Portainer data is stored. If you deleted the container (or somehow Portainer got uninstalled)... unfortunately it's gone. Once you log in, all your containers should be there and running as normal, but any customizing you did (stacks, etc.) will be gone.
-
-
Well right now this not really a big deal since I reinstalled with the old kernel from backup. But I don't understand if I do Install or remove portainer, it can find the right path from my customization but not after reinstalling nvidia driver to the new kernel?
So what should I do?
-
lets check if the data are in /var/lib/docker/volumes
-
ls -al /var/lib/docker/volumes/
-
-
root@OMV-MSI:~# ls -al /var/lib/docker/volumes/
total 32
drwx-----x 2 root root 4096 May 7 13:02 .
drwx--x--x 13 root root 4096 May 7 13:02 ..
brw------- 1 root root 259, 2 May 7 13:02 backingFsBlockDev
-rw------- 1 root root 32768 May 7 13:02 metadata.db
-
Well right now this not really a big deal since I reinstalled with the old kernel from backup. But I don't understand if I do Install or remove portainer, it can find the right path from my customization but not after reinstalling nvidia driver to the new kernel?
So what should I do?
if you remove it (and don't have a /data folder outside of your Containers folder) I'm pretty sure it gets purged. If you install it, and your data is all inside of the Containers folder... I'd assume there is the possibility it is getting installed over? If you want to save your portainer data, you really need to use docker-compose to install it as I detailed earlier. Then when you reinstall.. Reinstall portainer from the docker-compose again, and make sure it is pointing at the same /data folder. That will restore all portainer settings (stacks, users/passwords, etc.)
-
I am a little bit confused so i changed line 7 to - /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data
run the stack reboot see if everything is OK and go on with my nvidia kernel update. Right?
Code
Alles anzeigenversion: "2" services: portainer: image: portainer/portainer-ce:latest container_name: portainer volumes: - /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data - /var/run/docker.sock:/var/run/docker.sock - /etc/localtime:/etc/localtime:ro ports: - 8000:8000 - 9000:9000 restart: unless-stopped
-
-
I am a little bit confused so i changed line 7 to - /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data
run the stack reboot see if everything is OK and go on with my nvidia kernel update. Right?
Code
Alles anzeigenversion: "2" services: portainer: image: portainer/portainer-ce:latest container_name: portainer volumes: - /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data - /var/run/docker.sock:/var/run/docker.sock - /etc/localtime:/etc/localtime:ro ports: - 8000:8000 - 9000:9000 restart: unless-stopped
No.
Because most likely before your "data" volume was inside your container folder, which for some reason is no longer there... thus why it prompted you for a new username and password.
To prevent this in the future, you'd need to map this outside your container folder. When you reinstall Portainer, just point it at your data folder as I did and run the compose file. Once it's done, it is basically like nothing ever happened.
Since you have nothing in /var/lib... I'm guessing whatever configuration you had before is gone.
-
Still I do not get it right now all my portainer data are at /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data/_data
should I copy them to /var/lib/docker/volumes/
or just in omv at docker storage input /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data/_data
and ran the stack?
sorry it is not clear to me i am kind of dumb!
-
Note line 7. This basically means if I ever reinstall Portainer all I have to do is point that "/data" volume at the appropriate folder I've designated for Portainer... and all my stacks, settings, password etc.. is all saved there.
That’s a neat trick.
-
-
Still I do not get it right now all my portainer data are at /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data/_data
should I copy them to /var/lib/docker/volumes/
or just in omv at docker storage input /srv/dev-disk-by-uuid-2673986a-ae3f-49c9-bf92-3fe6011743d8/docker/volumes/portainer_data/_data
and ran the stack?
sorry it is not clear to me i am kind of dumb!
I honestly can't be any more clear than I've been because I'd just be repeating myself. If you were prompted for a new username and password, then for some reason, your container data for Portainer, got deleted. When you log in will still show your containers, etc.. but anything else (stacks you've made, etc.) will be gone. So at this point doin anything, is probably irrelevant.
If you want to prevent this in the future, as I said... map that folder to a folder OUTSIDE of your container folder (as I did) and then from this point forward, install portainer from that docker-compose file, not from the button in OMV. If your /data drive is mapped correctly.. all your portainer data will be stored there.
-
That’s a neat trick.
Yep. I figured that out when something happened and I had to reinstall Portainer, and I lost all my stacks (well they were there, but I couldn't edit them or deploy them).
Now, I could completely reinstall OMV and once I deploy Portainer with that compose file, all my portainer data will be there like stacks, my admin user/password will be the same..
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!