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
11 hours ago, unabletoconnect said:

Hey,

updated to 7.3.0-Beta1, and swapped over to internal boot.

I now get a AJAX error when attempting to save settings. Would i be right in that this might be caused by the config file now been located in a new location?

I've been able to make the config changes by manually editing the .cfg, so no rush with investigation - more of a FYI.

Thanks for reporting. I haven't really had the time to update to the beta yet, so I can't confirm. But if the .cfg file is indeed in a different location, that would probably cause the error, yeah. Did you move it yourself, or does the internal boot option have a different directory structure? The .cfg file is saved in /boot/config/plugins/DiskSpaceManagement/ by default.

  • 2 weeks later...
  • 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

  • Author
On 3/31/2026 at 3:07 AM, unabletoconnect said:

Hey,

updated to 7.3.0-Beta1, and swapped over to internal boot.

I now get a AJAX error when attempting to save settings. Would i be right in that this might be caused by the config file now been located in a new location?

I've been able to make the config changes by manually editing the .cfg, so no rush with investigation - more of a FYI.

This is fixed now, please pull down the new version. :)

  • Author

@rgreen83 I thought about your suggestion and decided not to implement it. The reason is that it will, as mentioned, result in files going to different drives. Most people using this plugin would want the folders they're moving to stay on one drive and not be scattered (potentially) over the entire array. Even if I put a big red warning that this setting will do that, there's always someone who will use the setting by accident and not realize it. And fixing that "mistake" is going to take a lot of work to get the files back to where they're supposed to be. I felt like I owed you an explanation at least, as to why you won't be seeing this implemented.

Reading whole thread and try to understand the purpose of the plugin are free-up space on disk, but I would think if that happen, then it just mean user not well planning at all.

On 3/25/2026 at 12:24 AM, strike said:

It selects the largest FOLDER, and you're correct, it moves the whole folder. The script was originally meant to only move media files, like movies and tv shows. And my logic then was that the whole folder should be moved. Who would want only parts of a movie folder/season of a show moved..(?). :) That might leave files related to the movie/show on different disks. And the whole point of the script was to free up space on almost full disks, but still keep files that were supposed to be together (based on split-level) in the same folder.

But I also interest to ask do you mean plugin will check UR "split-level' setting and affect the moving logic ? I assume answer is YES, because if whole folder move then it usually impossible due to target disk also haven't enough space.

Below are my use case for ref., this not about to free-up space, it is house keeping wanted.

. User should well planning the structure and with UR split-level setting then it should not running out-of-space issue.

. But split-level won't help to keep folder-level in same disk ( I think most people want that )

My solution was manual delete ( or move to temp folder ) all smallest file(s) which out of target disk within target folder-level, and sync back again, then all will allocate in same disk. And I hope a plug-in could do this for me. ( Just the direction, not all step list out )

Edited by Vr2Io

  • Author
6 hours ago, Vr2Io said:

Reading whole thread and try to understand the purpose of the plugin are free-up space on disk, but I would think if that happen, then it just mean user not well planning at all.

That's how split-level works. Even if the user has planned the file structure well, split-level can and will try to move files to disks that are full, if the split level says the files should go to that disk. E.g: I want my tv shows to stay on the same disk. So all seasons and all episodes stay on the same disk. If that disk is nearly full, my split-level will still try to move new files to shows that exists on that disk and will fail because of no space left on the disk. So this plugin's job is to move folders from full disks to other disks, always keeping some free space left on almost full disks, so that if new episodes of a show are coming on that disk, it always has space for it.

Now, that was the original purpose of the plugin. But it can also be used for other use cases, like to rebalance the array as the unbalance plugin does, it just does it a different way. Or it can be used to empty drives to other drives.

7 hours ago, Vr2Io said:

But I also interest to ask do you mean plugin will check UR "split-level' setting and affect the moving logic ? I assume answer is YES, because if whole folder move then it usually impossible due to target disk also haven't enough space.

No this plugin does not check or change your split-level settings. It will just move folders based on your settings in the plugin. But you're right, if I have this path set in the plugin /media/tv shows/ and I have selected to move the largest folder first, then yes, it will try to move the largest folder in the tv shows folder to a new drive. And with TV shows that could be hundreds of gigabytes. And if you have no drives with that much space left, it will fail to move it. But you don't have to move the largest folder, you can choose some of the other options e.g smallest. This plugin does not magically give you more total space. If all your disks are almost full, then you have a problem you can only solve by buying more drives.. )

Regarding the largest folder first moving option, I've added a check that checks if the target disk has the required space left, so it doesn't fail if it's too big. I was supposed to add that in a previous version anyway, but I forgot about it. It will then log a warning and tell you that it won't fit on the target disk, and tell you to change your folder sorting order or simply add more drives. It will then move on to the next configured folder in the plugin.

7 hours ago, Vr2Io said:

. User should well planning the structure and with UR split-level setting then it should not running out-of-space issue.

With this plugin, you will not run out of space, yes, but it doesn't check or change your split-level settings.

7 hours ago, Vr2Io said:

But split-level won't help to keep folder-level in same disk ( I think most people want that )

It does, and this is exactly what split-level is for. Just make sure you set the right split level based on your folder structure and where you want to split.

7 hours ago, Vr2Io said:

My solution was manual delete ( or move to temp folder ) all smallest file(s) which out of target disk within target folder-level, and sync back again, then all will allocate in same disk. And I hope a plug-in could do this for me. ( Just the direction, not all step list out )

My solution before this plugin was to move folders manually to other drives. I had to do this every day, and now this plugin does it for me. :)

Thanks your reply and clarify.

1 hour ago, strike said:

does, and this is exactly what split-level is for. Just make sure you set the right split level based on your folder structure and where you want to split.

Yes, the reaason for this happen usually because physical disk or total disk no. charge, then some folder will allocate on different disk.

In last year, I rewrite all from 8 to 3 disks, then about 5% file/folder allocate on different disk, finally I fix it manually. If change back from 3 to 8 disks then I would expect much more folder on different disk will happen painfully.

  • Author
20 minutes ago, Vr2Io said:

Yes, the reaason for this happen usually because physical disk or total disk no. charge, then some folder will allocate on different disk.

In last year, I rewrite all from 8 to 3 disks, then about 5% file/folder allocate on different disk, finally I fix it manually. If change back from 3 to 8 disks then I would expect much more folder on different disk will happen painfully.

Sorry, I don't think I understand your reply. Split level does not care about how many disks you have. It simply set a rule that, e.g if the folder depth is two for that share, it should continue to write files to those that are depth 3 or higher, folder no matter what, but if the folder depth is two or less, it could write those files to other drives.

So if you're saying that unraid keeps writing files to other disks that you want to stay in the same folder on the same disk, then your split level settings are wrong, and that's why it keeps writing to other drives.

E.g my folder structure is /media/TV Shows/Show name/Season/s01e01.mkv

My split level is set to "Automatically split only the top two directory levels as required". This means that it can split files at level two, which is /media/Tv Shows/. So each TV show can go to whichever disk (based on the allocation method), but if files come in that are level 3 or higher (media/Tv Shows/Show name), it will write them to the disk that already has this show.

Sorry to mke you confused, the first word "Yes" means I agree what you say, I know how split level work, but in some special situation it will out of expectations and I assume you would understand that and I haven't explain in detail.

As mention, in last year, I rewrite whole array, I use rsync for all, but rsync have a issue, when it start wring to target, it will create many empty folder first, and this will break those split rule, let say file should writing to disk 2,3,4 but due to empty folder create to disk 2 first, it will affect most file go to disk2 .....

And if I have three target disk, I will well planning whole structure then fire three session to speedup the copying. Then last fine tune how to copy the remaining. Anyway all are expected.

Below are the post for much detail for rsync create empty folder issue .... Of course you can writing script to avoid, but this too complicated.

https://forums.unraid.net/topic/133960-how-to-deal-with-rsync-creating-all-empty-folders-first-and-causing-disks-to-run-out-of-space/

  • Author
8 minutes ago, Vr2Io said:

As mention, in last year, I rewrite whole array, I use rsync for all, but rsync have a issue, when it start wring to target, it will create many empty folder first, and this will break those split rule, let say file should writing to disk 2,3,4 but due to empty folder create to disk 2 first, it will affect most file go to disk2 .....

Aaah, yes, now I understand what you're saying. And yes, I do know about this rsync issue. I wish they would change that, but I guess it will remain that way, a wish.. But also, most people starting out with a server don't have this problem, as they will fill up the server naturally. But you also have those that already have lots of data they want to move to their server, and using rsync will see this issue.

I also wish rsync could change this behaviour too. But finally negative and I can't found a way to overcome this.

Thanks.

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.