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.

[Plugin] Disk space Management - Mainly for those who use the split-level feature in Unraid.

Featured Replies

  • Author
28 minutes ago, Nonoss said:

I have just noticed that the free space for a disk after a move in the notification (both mail and unraid notification) is 0.00 (according to my choice, it should be around 50GB) Is it normal ?

That's something I haven't seen before. But I think this happens because of a caching delay in the OS, The script is reading the disk's free space immediately after moving the files, and the system often hasn't updated its records yet, leading to a stale (and in this case, incorrect) reading of 0. I've added a sync command to the script. This command forces the system to write all cached data to the disk, ensuring that any subsequent reads of the disk's free space are accurate. A new update is ready shortly.

  • Replies 111
  • Views 8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • You can have multiple libraries in both movies and tv libraries, comma separated. E.g: share/Movies,share/Anime-Movies And share/TV,share/Anime-TV

  • Glad you like it. The correct way to exclude disks is a comma-separated list of full disk paths like this: /mnt/disk1,/mnt/disk2 I just realized that I could try to implement this better by listing al

  • Awesome. Yeah, I broke the cron schedule a while back. Fixed it, but the setting needed to be reapplied like you just did. You mean other than movies and tv shows? If you can tell me what the logic

Posted Images

With the last update, the free size is ok now.

image.png

Thank's

16 hours ago, strike said:

You mean other than movies and tv shows? If you can tell me what the logic should be, I can probably figure something out. I could add a third category for "Other Paths" that would have the lowest priority. This means the script would only move files from your "other" paths if it couldn't free up enough space by moving movies or TV shows first. The new logic would be: Movies > TV Shows > Other Files.

Like movies, the items in the "other" paths would just be folders that the script would move one by one. Maybe starting with the smallest folder first? Or did you have anything else in mind?@Nonoss

Yes, something like that would be nice. Not sure for the "Other Files" if moving smallest would be the best, some configurability here would be appreciated, but a simple approach would be sufficient as a middle step.

Btw, would it be possible (just a general question), to adjust this priority? So I could configure that tv shows are moved first, then other files and last movies or so?

  • Author
7 hours ago, Joly0 said:

Yes, something like that would be nice. Not sure for the "Other Files" if moving smallest would be the best, some configurability here would be appreciated, but a simple approach would be sufficient as a middle step.

What should the configurable options be? Just, smallest folders and random folders? Alphabetically? Other sorting orders?

7 hours ago, Joly0 said:

Btw, would it be possible (just a general question), to adjust this priority? So I could configure that tv shows are moved first, then other files and last movies or so?

Should be doable. This is an excellent idea, btw. I can see if I can take a look at your suggestion next week, as I have some free time then.

On 8/27/2025 at 6:27 PM, strike said:

What should the configurable options be? Just, smallest folders and random folders? Alphabetically? Other sorting orders?

So i think by smallest and alphabetically should be sufficent for me, in normal order and reversed. Maybe also newest/oldest would be nice aswell. Not sure if random would be of any help (for me), but might be worth implementing aswell if it isn't to hard to add :)

Edited by Joly0

  • Author
15 hours ago, Joly0 said:

So i think by smallest and alphabetically should be sufficent for me, in normal order and reversed. Maybe also newest/oldest would be nice aswell. Not sure if random would be of any help (for me), but might be worth implementing aswell if it isn't to hard to add :)

Got it. I'll see what I can come up with without making it too complicated.

  • strike changed the title to [Plugin] Disk space Management - Mainly for those who use the split-level feature in Unraid.
  • Author

New version is out, be sure to check out the new settings. It now supports "Other Library Paths", where you can basically put any folder(s) you like. Multiple sorting orders are available, as well as the ability to set the priority for which library is moved. I've been testing it for the last couple of days, and everything appears to be working as expected.

  • 4 weeks later...

I have some weird problem with this plugin when it moves movies.

For example, when it moved a movie from disk7 to disk5, the movie disappeared from the share "/mnt/user/data/video/movies/blahblah" but the movie is still visible in "/mnt/disk5/data/video/movies/blahblah" directory.

This means that Plex and Radarr can't find the movie anymore.

This has happened to numerous movies, and they all show up in the log files of this plugin.

I don't have the log files available anymore since I uninstalled this plugin.

Now I have to figure out how to make all those movies to re-appear, without losing any of them.

  • Author
5 minutes ago, ICDeadPpl said:

I have some weird problem with this plugin when it moves movies.

For example, when it moved a movie from disk7 to disk5, the movie disappeared from the share "/mnt/user/data/video/movies/blahblah" but the movie is still visible in "/mnt/disk5/data/video/movies/blahblah" directory.

This means that Plex and Radarr can't find the movie anymore.

This has happened to numerous movies, and they all show up in the log files of this plugin.

I don't have the log files available anymore since I uninstalled this plugin.

Now I have to figure out how to make all those movies to re-appear, without losing any of them.

Oh, that's a weird one. Since everything under the same share in /mnt/disk.. should appear in mnt/user.. Are you saying it happened to only some movies and not all? What path do you use in plex/radarr? It's the same one that's in the log, except only /mnt/user/data.. instead of disk..? Does the share you have in plex/radarr have any disks excluded in the share settings?

  • Author

And when you encountered this, did you run a library scan in plex after? I use emby, so I'm not familiar with how plex works, but emby does library scans every 24h, I think, to update any existing files. Are you saying the movies are still gone from plex after a library scan is initiated?

  • Author

@ICDeadPpl Since you didn't respond, I assume you figured out the issue yourself? It was probably a caching issue. Since writing directly from disk to disk bypasses the FUSE user share system, it can sometimes take some time before the files show up in the user share. I can probably put in some code, adding a "cache refresh" command, forcing an update, ensuring the user share system is immediately aware of the file's new location.

  • 1 month later...
  • Author
On 9/27/2025 at 5:32 PM, strike said:

I can probably put in some code, adding a "cache refresh" command, forcing an update, ensuring the user share system is immediately aware of the file's new location.

So I did put in some code to attempt to fix this issue a while ago, but I didn't release it. Mainly because I'm unable to reproduce the issue, so I don't know if the fix will work or not. But I just pushed an update now, so it would be much appreciated if those experiencing this issue could confirm if it's working or not.

  • 1 month later...

For the benefit of other users that follow me, could you please give an indication what the context folder is for the path to the movies and series is? It took some head scratching to realise that it was /mnt/user/

Even better would be the ability to browse the folder structure when inputting the folder location. Perhaps you could also consider make the list of folders flexible. You give us 3, but I only use two. If you had a list of folders then you would be able to add or remove from the list and re-order for intuitive priority.

  • Author
5 hours ago, ianstagib said:

For the benefit of other users that follow me, could you please give an indication what the context folder is for the path to the movies and series is? It took some head scratching to realise that it was /mnt/user/

If you click the help button in the top right corner of the webui you'll get all the info you need, but you should use relative paths. So if your movies is under /mnt/user/Media/Movies the path would be: Media/Movies Remeber that linux is case sensetive. And please read the help text for more info :)

5 hours ago, ianstagib said:

Perhaps you could also consider make the list of folders flexible. You give us 3, but I only use two. If you had a list of folders then you would be able to add or remove from the list and re-order for intuitive priority.

What do you mean by this? You can put multiple paths in each library, comma separated. If you use only 2 you leave the third one empty.

5 hours ago, ianstagib said:

Even better would be the ability to browse the folder structure when inputting the folder location.

The problem is that this plugin moves from disk share to disk share, not user share. If I change it to the user can browse the share, it needs to browse the user share. And let's say a user selects /mnt/userMedia/Movies the script would then need to strip out the /mnt/user part because moving from a user share to a disk share could be very bad and lead to data loss because of the user share copy bug. So the choice to let the user NOT select the path by browsing the share is very deliberate.

Edit: For those who don't know; The "user share copy bug" refers to a data-loss issue in Unraid (and similar NAS systems) where copying files from a disk within a user share to the user share itself (e.g., from \\Tower\disk5\ShareA to \\Tower\ShareA) causes files to become corrupted or truncated to zero bytes. It happens because the system tries to overwrite files with themselves.

Edited by strike

  • 2 weeks later...

The plugin seems be e confused by ZFS drives containing datasets in the array. When run, the log contains a bunch of items like this:

2025-12-26 13:11:24 - Disk backup/apps_appdata is below the 50GB threshold (initial space: 0GB). Planning moves...

2025-12-26 13:11:24 - No movable files found on backup/apps_appdata in any of the configured valid library paths.

There is no reason for the tool to be considering items that are not in the list of shares I provided. Those datasets are not disks.

  • Author
5 minutes ago, Crimzon said:

The plugin seems be e confused by ZFS drives containing datasets in the array. When run, the log contains a bunch of items like this:

There is no reason for the tool to be considering items that are not in the list of shares I provided. Those datasets are not disks.

Ooh, that's going to be a hard one for me to test since I don't use ZFS and thus the plugin hasn't been tested for that. Can you please provide a screenshot of the top directories on one of your disks?

This tool seems like it could be useful, but I would suggest a few changes.

  • I would like to be able to select the shares I want it to monitor from a list with check boxes, rather than having to type the names of the shares. This would be easier to configure, remove the possibility of types or case mismatches, and allow for an arbitrary number of shares to be considered.

  • Similarly, once selected, I would like to be able to order the list of the arbitrary number of shares I selected rather than having a comma delimited list of tv,movies,other

  • I would prefer that it honored the include/exclude lists that are already defined for the shares. So if it was moving folders from disk1 of the Movies share, it would evaluate the other shares that were allowed by the exclude/include lists for that share rather than all disks with the plugin level exclude list.

Someone mentioned the share selection above and the response discussed the issues with moving files between user shares. But while the list of user shares is avalable in /mnt/user/..., the file moves should be done via /mnt/diskX/... Those seem to be distinct issues.

  • Author

How does a dataset look like? Is it ounted like

14 minutes ago, Crimzon said:

The plugin seems be e confused by ZFS drives containing datasets in the array. When run, the log contains a bunch of items like this:

There is no reason for the tool to be considering items that are not in the list of shares I provided. Those datasets are not disks.

And what does a dataset look like? Is it a seperate mountpoint like with unassigned devices which uses /disks/?

  • Author
4 minutes ago, Crimzon said:

This tool seems like it could be useful, but I would suggest a few changes.

  • I would like to be able to select the shares I want it to monitor from a list with check boxes, rather than having to type the names of the shares. This would be easier to configure, remove the possibility of types or case mismatches, and allow for an arbitrary number of shares to be considered.

  • Similarly, once selected, I would like to be able to order the list of the arbitrary number of shares I selected rather than having a comma delimited list of tv,movies,other

  • I would prefer that it honored the include/exclude lists that are already defined for the shares. So if it was moving folders from disk1 of the Movies share, it would evaluate the other shares that were allowed by the exclude/include lists for that share rather than all disks with the plugin level exclude list.

Someone mentioned the share selection above and the response discussed the issues with moving files between user shares. But while the list of user shares is avalable in /mnt/user/..., the file moves should be done via /mnt/diskX/... Those seem to be distinct issues.

I'll answer this one in a few, dinner first :)

6 minutes ago, strike said:

Ooh, that's going to be a hard one for me to test since I don't use ZFS and thus the plugin hasn't been tested for that. Can you please provide a screenshot of the top directories on one of your disks?

image.png

My disk5 is a ZFS drive. I backup my ZFS appdata drive to it and create ZFS snapshots of important data.

1 minute ago, strike said:

How does a dataset look like? Is it ounted like

And what does a dataset look like? Is it a seperate mountpoint like with unassigned devices which uses /disks/?

A dataset is just a special type of folder on ZFS drives. They are not listed in /mnt like physical drives although they can be mountable if they are also shares.

A dataset can contain other datasets, for instance. Here is a clip from the ZFS Master plugin.

image.png

  • Author
1 hour ago, Crimzon said:

A dataset is just a special type of folder on ZFS drives. They are not listed in /mnt like physical drives although they can be mountable if they are also shares.

A dataset can contain other datasets, for instance. Here is a clip from the ZFS Master plugin.

image.png

Thanks, I'll look into it and see if I can come up with a fix you can test.

  • Author

I always appreciate suggestions that can improve the plugin, so thanks for that.

2 hours ago, Crimzon said:

I would like to be able to select the shares I want it to monitor from a list with check boxes, rather than having to type the names of the shares. This would be easier to configure, remove the possibility of types or case mismatches, and allow for an arbitrary number of shares to be considered.

2 hours ago, strike said:

Someone mentioned the share selection above and the response discussed the issues with moving files between user shares. But while the list of user shares is avalable in /mnt/user/..., the file moves should be done via /mnt/diskX/... Those seem to be distinct issues.

I understand, I want this myself to be honest, but it's not that simple. I don't know how long you've been using unraid, but if you been using it for a while, you might know that there are two types of shares in unraid, user shares and disk shares. Most users don't even know that disk shares exist, because they're not enabled by default, and there's a good reason for that. And that's the "user share copy bug" which I explained in an earlier post. When only the user share is enabled, the user only sees /mnt/user/share, but when disk shares are enabled, all disks are also exposed, so in addition to seeing the shares, they also see all the disks in the file manager, like /mnt/disk5/share. And here is the issue I explained earlier: the problem is when a user copies/moves something from /mnt/disk5/share to /mnt/user/share or vice versa, this can lead to data loss and is the reason disk shares are not enabled by default. So the new users don't make this glorious mistake that it is.

So in order for the plugin to have checkboxes so the user can just check their shares, it needs to expose the directory tree in the filesystem. And if both types of shares are enabled, they will see their user shares and all the disk shares. But normally, they will only see their user shares. So, say a user then selects /mnt/user/movies instead of /mnt/disk5/movies, the script would then somehow need to strip out the /mnt/user part and replace it with /mnt/disk5/movies. Or else there may be data loss.

Everyone knows that user error happens all the time, and that's fine if it's their OWN fault. But I won't let it be MY fault just because of a bug in my script.. I would, of course, test it myself if I made the change (and I won't, unless somebody who knows unraid well convinces me that this is possible without exposing the directory tree). And everyone also knows, bugs happen all the time. Even if there was no bug at the time or in the past, there could always be a bug in the future. I would literally leave the internet and maybe move into the woods, never to be seen again, if somehow my script were the reason someone lost gigabytes or terrabytes of irreplaceable data. So yes, I will rather sacrifice a little convenience for a little more complex system for the user, if that helps keep their data safe. And the way it is now, there is no chance the script mistakes /mnt/user/movies for /mnt/disk5/movies. And you can still add how many shares you want.

2 hours ago, strike said:

Similarly, once selected, I would like to be able to order the list of the arbitrary number of shares I selected rather than having a comma delimited list of tv,movies,other

Since there are only three types of libraries, that decision made the most sense to me. But it might be possible to improve this based on how many shares are configured instead of libraries. I'll look into this and see if it makes sense.

2 hours ago, strike said:

I would prefer that it honored the include/exclude lists that are already defined for the shares. So if it was moving folders from disk1 of the Movies share, it would evaluate the other shares that were allowed by the exclude/include lists for that share rather than all disks with the plugin level exclude list.

This one should be doable, but there might be usecases where a user wants to exclude disks that are not already excluded in the share settings for whatever reason. Then the already implemented solution is better.

Edited by strike

  • Author
6 hours ago, Crimzon said:

I would like to be able to select the shares I want it to monitor from a list with check boxes, rather than having to type the names of the shares. This would be easier to configure, remove the possibility of types or case mismatches, and allow for an arbitrary number of shares to be considered.

So I have discussed this a bit, and I might have been convinced that this is possible to implement safely. Long story short, as long as my script never includes the /mnt/user/ in the rsync command, it should be good. So the UI is just a pointer, but in the backend, it is still the same logic. To be even safer, I could add a final validation check before the move that just exits and logs it if it sees /mnt/user/ anywhere in the rsync command. I'll look at this some more and see if I can implement it. I'm more hopeful now than I was before, and it will improve the plugin a lot. I might have overcomplicated things in my head. The rsync command is really the core command here, which does the move part. And if /mnt/user is never passed to that command, it will be safe.

I'll come back to you with that ZFS fix first, so you can test, as I think I know where the issue is. It would be nice to have solved that too, as I'm not able to test the fix myself.

  • Author

@Crimzon And anyone else who follows the thread. So I decided to look at your suggestion right away, as I had nothing else to do (other than gaming BF), and I've been hard at work implementing it. And I decided to add a major facelift as well, while I was at it. Here is a sneak peek at what the plugin will probably look like when I'm finished, with a few minor tweaks. With browsable shares, drag and drop to prioritize move order instead of a comma-separated list of libraries. etc. I still have a few kinks to iron out, but I like how it turned out visually, compared to what it used to look like.

image.png

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.