This is a note for my future self. When encountering the following error in
ERRO User-selected graph driver "btrfs" overwritten by graph driver "overlay" from database - delete libpod local files to resolve
There is help. Do as suggested to delete the libpod local files. (For rootful container see the section at the end of the post ) :
rm -rf ~/.local/share/containers/libpod
The issue arises from a mismatch between the defined storage driver (in
/etc/containers/storage.conf) and the database. Either setting the storage driver or nuking the libpod folder should resolve the issue for your own user (see the section below for rootful containers)
For me, this worked on my openSUSE Tumbleweed system. If it is still bugging you, you might want to nuke the whole containers directory. This will delete all your containers and container data however, so use with caution!
# CAUTION: This will delete all containers and container data! sudo rm -rf ~/.local/share/containers/
The default settings are stored if
/etc/containers/storage.conf. Don’t screw around there as it might be suggested in e.g. podman#5114. For me, trying to manually fit the storage driver only made the situation worse.
Unless you need to save some volumes, just stick to the suggestion of podman and delete the libpod local files as suggested. Start new, and everything is happy again.
Thank you past self!
My present self is thankful for this post, as it saved me already from some trouble. Thank you past self, this is nice.
This is why you should be blogging - My brain is very good at remembering useless stuff, but bad at keeping the details of those journeys, and I keep my own blog posts for the sake of my future self and a poor soul that ends up on my blog in the search for solutions of problems, that I also had.
Blogging can be a nice service from present self to future self.
Addendum: Rootful containers
This error can occur, when you switch the storage driver in your
[storage] # Default Storage Driver, Must be set for proper operation. #Switched to overlayfs due to https://github.com/containers/podman/issues/16882 #driver = "btrfs" driver = "overlay"
I resolved the issue by nuking the whole
/var/lib/containers directory and restarting the containers. CAREFUL though: This will delete all volumes in that folder! Don’t do this without backing the folder up or ensuring, that all of your stuff is stored elsewhere!
# WARNING: This will delete all container volumes, unless stored elsewhere!! umount /var/lib/containers/storage/btrfs rm -rf /var/lib/containers
I switches from
btrfs to the
overlay driver here, so I had to first unount the btrfs volume. Then just nuke the directory and restart all podman container services (which should pull the container again from their source).
And that’s it! Good as new 😀