Hey everyone! I've got three standalone systems running Docker—two on openSUSE Tumbleweed and one on a Synology NAS. I'm using Portainer with agents installed on each one. The interesting thing is that when I create a stack on my Synology, which uses path mapping like `/var/lib/docker/volumes/myapp:/config`, it works perfectly without creating any extra named volumes. My Synology has over 30 containers and none of them show additional volumes in the Portainer Volumes tab. However, on my Tumbleweed setups, every time I create the same stack, an extra volume `/var/lib/docker/volumes/myapp/_data` shows up. This volume is marked as "unused" but deleting it causes some negative effects. It's also curious that the details for these `_data` volumes show that all my containers relate to them. Can someone explain why this is happening? Could there be settings in Synology or openSUSE's Docker implementations that lead to this difference? Thanks a bunch!
2 Answers
Exactly! One system is using a direct bind mount (your Synology), while the Tumbleweed is creating managed volumes. They both use the same syntax for defining volumes, but the way they handle them is different. Managed volumes are orchestrated by Docker and typically come with the `_data` suffix. You've got the right idea researching this—there's definitely a difference in how these platforms implement Docker.
It seems like you're manually mapping a bind volume directly under `/var/lib/docker`, which might explain the different behaviors on your systems. On the Synology, Docker is likely handling volumes differently by not creating those `_data` folders since you're using a direct bind mount. It's designed that way to keep things clean and prevent unnecessary volume creation. The Tumbleweed systems, on the other hand, create managed volumes which show up as `_data` folders by default. So, if you want to avoid those extra volumes, consider adjusting your setup to align with Synology's approach if that's working better for you.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures