Closed elkarto closed 4 months ago
Hi, please try to do ha su repair
in terminal and it should remove all dangling volumes. It is alas inherent to the way the addons are set and I don't think it is possible to fully prevent it without a major refactoring. As such, I have an automation to periodically run ha su repair
on my system
Hi @alexbelgium
I tried a "ha su repair", the command completed successfully but the volumes were not deleted.
Thanks for the feedback - you might try docker volume prune
to remove all volumes unused (https://frameworks.readthedocs.io/en/latest/docker/pruneDocker.html)
A more aggressive alternative is docker prune -a
that will delete all unused volumes, containers... This will also delete containers of addons stopped, so you would need an ha su repair
to re-create them afterwards.
Alas I base my dockerfiles on pre-existing containers that already reference volumes - and there is no way to cancel their creation that I know of. So I would need to re-create the whole initial container which is much more cumbersome. Periodically running the commands (at 1am for example) should keep your system fit...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
The addon creates and uses a docker volume for its operation. The volume is mounted to "/usr/app/config"
The problem is that every time the addon is restarted it creates a new volume, leaving the previous one unused (without deleting it).
My knowledge of docker is limited but I believe that this behavior is not expected.
Reproduction steps
Addon Logs
Architecture
amd64
OS
HAos, Virtual Machine