Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why so many unused volumes?

Featured Replies

Not sure if this is just a docker feature or whether this is down to how unraid updates containers but I regularly have to go in and seem to end up deleting about 10 unused volumes.

 

I am guessing that it must be something like when container is updated the old volume gets disconnected and a new one created and the old one then sits there in limbo?

 

Is there any way to stop this build up of volumes happening?

There's an issue if you update from within Apps that it causes orphan images to appear.  Harmless since the orphans don't actually take up any space and on a todo list to fix

  • Author
1 hour ago, Squid said:

There's an issue if you update from within Apps that it causes orphan images to appear.  Harmless since the orphans don't actually take up any space and on a todo list to fix

It is volumes rather than images.   I only update my containers through unraid UI (that I can think of anyway).

Looking again now I am not sure whether this is something odd in Portainer.   It was showing lots of unused volumes so I deleted them.   It is now showing two volumes but I have many more than that (Portainer itself shows volumes against containers correctly just not in the volume list 😕)
Will see if I can establish when they appear and what they relate to

  • Community Expert
8 hours ago, jameson_uk said:

I am guessing that it must be something like when container is updated the old volume gets disconnected and a new one created and the old one then sits there in limbo?

It is this, though its not specifically when a container is updated rather it is every time a container is recreated. The answer to why it happens is because docker does not automatically delete volumes when a container is removed, and unless you specify a named volume it wont reattach the volume a new container.

 

8 hours ago, jameson_uk said:

Is there any way to stop this build up of volumes happening?

There are a couple of options. The first would a creating a script to periodically cleanup unused volumes. The docker cli has a purge command (not sure of the exact syntax) that will remove unused volumes.

The other option would be to ensure that they never get created in the first place. When creating a docker image the author uses the VOLUME keyword to specify which paths must be backed by a volume. When running a container specified paths must either be attached to a volume or a bind mount. If the user does not specify a named volume then docker automatically creates an anonymous one for that container which ends up being your problem. In unRAID we typically use bind mounts but template authors might not always specify a bind mount for every volume in the image (typically because it is of no use to the user or it is unknown to the author since many dot create the images that they host templates for). You could use docker inspect on your images to determine which ones have anonymous volumes attached and then add path mapping to there templates.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.