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

image.png

Unraid Disk Space Management Plugin

Description: This plugin was created mainly for those who use the split-level feature in Unraid. Due to how split-level works, it will ignore the minimum free space setting and continue to move stuff to disks that are full/almost full if your split-level setting permits it. This is because split-level tries to keep files and folders that belong together (based on your split-level setting) on the same disk, and split-level trumps all other settings. Even if there's little space left on the disk.
So to combat this, this plugin will automatically move folders from disks that are below the threshold setting to the disk with the most free space available. It's recommended to set the cron schedule to a time when you know the mover has finished.
Features:
  • Intelligent Threshold Monitoring: Continuously monitors array disks and triggers move operations when free space falls below your defined GB threshold.

  • Folder Priority Queue: Features a drag-and-drop interface that allows you to prioritize which directories are processed first.

  • Per-Path Granular Sorting: You can independently configure sorting rules for every folder in your queue, including Smallest First, Alphabetical (A-Z or Z-A), Newest First, or Oldest First.

  • Dual-Layer Disk Exclusions: Provides both global disk exclusions and folder-specific exclusions to give you precise control over where data can and cannot be moved.

  • Interactive Path Picker: Includes a built-in visual folder browser to easily select and add new management paths directly from your Unraid array.

  • Real-Time Status Tracking: A live dashboard badge displays whether the engine is currently "IDLE" or "RUNNING".

  • Advanced Safety Guards: Integrated protection prevents accidental moves to or from /mnt/user and includes loop prevention logic for simulated runs.

  • Smart DRY RUN Mode: Safely test your configuration with a full simulation that logs exactly what would happen without moving a single file.

  • High-Performance File Transfer: Uses rsync to move data, ensuring all permissions, attributes, and hard links are perfectly preserved.

  • Modernized Log Terminal: Features a dedicated log management tab with a high-visibility console, auto-scrolling, and the ability to clear logs directly from the UI.

  • Automated Scheduling: Fully customizable cron scheduling to ensure management tasks run at the most convenient times for your server.

Edited by strike

  • Replies 111
  • Views 7.6k
  • 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

Reserved

  • 3 weeks later...
  • Author

The plugin is now available in CA :)

Hey, cool plugin. I just tried it out and noticed, that the log file is not created nor written to at all. I also checked the script that should move the stuff, but there is nothing either. The variable with the path is initialized at the beginning, but the variable nor the file itself is used anywhere in the script. Otherwise, cool plugin. I like it

  • Author
25 minutes ago, Joly0 said:

Hey, cool plugin. I just tried it out and noticed, that the log file is not created nor written to at all. I also checked the script that should move the stuff, but there is nothing either. The variable with the path is initialized at the beginning, but the variable nor the file itself is used anywhere in the script. Otherwise, cool plugin. I like it

Weird,it was created in my tests. Did you use the default path or did you use your own path? I'll look into it when I get home in a few hours.

Yes, i have the default path configured:
grafik.pnggrafik.pnggrafik.pngNothing there

Edited by Joly0

  • Author
2 hours ago, Joly0 said:

Yes, i have the default path configured:
grafik.pnggrafik.pnggrafik.pngNothing there

I've fixed the issue now, so the logfile is created correctly. Please update the plugin :)

The issue was that when you click the "Run Script Now" button in the UI, the script's output is sent directly to the iframe on the web page so you can see the progress. However, there is no redirection to the log file in this case. As a result, the log file is only ever created and written to when the scheduled cron job runs for the first time, not when you trigger it manually. The script is now modified to do its own logging to ensure the log file is created the first time when run manually as well.

Cool plugin.

Is it possible to ask for an option to specify a 3rd library? - I keep my Anime separate to my movies and TV and I'm sure i wouldn't be the only one.

Keep up the good work!

  • Author
2 hours ago, unabletoconnect said:

Cool plugin.

Is it possible to ask for an option to specify a 3rd library? - I keep my Anime separate to my movies and TV and I'm sure i wouldn't be the only one.

Keep up the good work!

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

I'm interested in this and have installed it, but I want to confirm what it will do before I disable the dry run setting.

I believe the goal of this plugin (and please correct me if I'm wrong) is to work in the background to consolidate TV show folders on individual disks, so, for example, if I copy The Office from the array, only one disk has to be spun up. I admire this goal, and have been working on changes to keep disks spun down, namely expanding my cache pool and implementing the PlexCache script to move "on deck" TV shows to my cache disk.

To make sure I have everything configured correctly, here is my setup:

I have my media split into Movies and Television. Television is further subdivided by genre.

/mnt/user/Movies/[movie folders]

/mnt/user/Television/Comedy/[show folders]

/mnt/user/Television/Drama/[show folders]

/mnt/user/Television/[many other genres]/[show folders]

The plugin is configured with:

Movie Library Paths: "Movies,Movies-4K"

TV Show Library Paths: "Television/Comedy,Television/Drama,Television/[genre]"

My shares were set up to "Automatically split any directory as required", but from what I understand I need to change my Movies share to split at the top level and Television to split at the top two levels.

Does that configuration seem correct?

Would you recommend splitting directories at the Show level or the Season level?

When I run the script, I get the following in the log:

Starting Disk Space Management script...

2025-07-23 00:53:40 - --- Disk Space Management script starting ---
2025-07-23 00:53:40 - *** DRY RUN MODE ENABLED *** No files will be moved.
2025-07-23 00:53:40 - --- Disk Space Management script finished ---


Script finished.

  • Author
22 minutes ago, jmello said:

I'm interested in this and have installed it, but I want to confirm what it will do before I disable the dry run setting.

I believe the goal of this plugin (and please correct me if I'm wrong) is to work in the background to consolidate TV show folders on individual disks, so, for example, if I copy The Office from the array, only one disk has to be spun up. I admire this goal, and have been working on changes to keep disks spun down, namely expanding my cache pool and implementing the PlexCache script to move "on deck" TV shows to my cache disk.

To make sure I have everything configured correctly, here is my setup:

I have my media split into Movies and Television. Television is further subdivided by genre.

/mnt/user/Movies/[movie folders]

/mnt/user/Television/Comedy/[show folders]

/mnt/user/Television/Drama/[show folders]

/mnt/user/Television/[many other genres]/[show folders]

The plugin is configured with:

Movie Library Paths: "Movies,Movies-4K"

TV Show Library Paths: "Television/Comedy,Television/Drama,Television/[genre]"

My shares were set up to "Automatically split any directory as required", but from what I understand I need to change my Movies share to split at the top level and Television to split at the top two levels.

Does that configuration seem correct?

Would you recommend splitting directories at the Show level or the Season level?

When I run the script, I get the following in the log:

Starting Disk Space Management script...

2025-07-23 00:53:40 - --- Disk Space Management script starting ---
2025-07-23 00:53:40 - *** DRY RUN MODE ENABLED *** No files will be moved.
2025-07-23 00:53:40 - --- Disk Space Management script finished ---


Script finished.

This plugin is for those who don't use split any directory as required. Since you use that I suspect that you maybe have shows spread across multiple drives. If you want to consolidate your shows to individual drives you'll have to do some manual moving first,then change to the split level you want as split level only applies to new files. If you want to split at show level or season level is really a personal preference. I like to split at show level.

It looks like you have the paths set up correctly. What is your threshold setting at in GB? And did you have any drives below that level when testing the dry run? If no disks are below the threshold it wont move anything and the script finishes without doing nothing.

For testing you can put a higher threshold, anything higher then what you have as available space on one or more drives. Then do a dry run to see what it will do.

I couldn't get this to work at first and even deleted it. I later revisited it and did some digging.

In my case my files are stored at /Media/Movies and /Media/TV

in the settings they displayed by default as:

media/Movies

media/TV

it dawned on me that media might need to be Media for the plugin to work. Sure enough I changed the media to Media and it fired right off. Not sure if you should build in case checking or simply place a note making sure they insure their case is right to be problem free.

  • Author
1 hour ago, kizer said:

I couldn't get this to work at first and even deleted it. I later revisited it and did some digging.

In my case my files are stored at /Media/Movies and /Media/TV

in the settings they displayed by default as:

media/Movies

media/TV

it dawned on me that media might need to be Media for the plugin to work. Sure enough I changed the media to Media and it fired right off. Not sure if you should build in case checking or simply place a note making sure they insure their case is right to be problem free.

Thanks for the feedback. Yeah,linux is case sensitive so getting the case right is important. I'll add a note in the help text about it and maybe see if I can add case checking.

Like this plugin, hope it will help me fix my disk place with split level. But I need to "Excluded Disks" from the check, what is the correct way to list up disks?

disk1,disk2,disk3

Disk 1, Disk 2, Disk 3

Thanks!

  • Author
2 hours ago, ChillZwix said:

Like this plugin, hope it will help me fix my disk place with split level. But I need to "Excluded Disks" from the check, what is the correct way to list up disks?

disk1,disk2,disk3

Disk 1, Disk 2, Disk 3

Thanks!

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 all the disks and just adding a check box that the user can check to exclude each disk. I'll work on that for the next version.

  • 4 weeks later...

This plugin is usefull for me. Thank's for sharing it.

I'm using notifications. Two notifications are sent , one for the start of the script, and one for the end of the script. But no summary.

Woul'd it be possible to send only one notification, at the end of the script, with informations about the job (start time end time), the log content for the move, or a summary of what the script did ?

Thank's

  • Author
2 hours ago, Nonoss said:

This plugin is usefull for me. Thank's for sharing it.

I'm using notifications. Two notifications are sent , one for the start of the script, and one for the end of the script. But no summary.

Woul'd it be possible to send only one notification, at the end of the script, with informations about the job (start time end time), the log content for the move, or a summary of what the script did ?

Thank's

I'm glad you find it usefull. Sure, I can add that in the next version. ☺️ A summary is probably best instead of the entire log. In case there's a lot to move, the notification would be long. Or just add the log to the email being sent. Or whatever notification agent the user have.

Edited by strike

1 minute ago, strike said:

... A summary is probably best instead of the entire log. In case it there's a lot to move, the notification would be long. Or just add the log to the email being sent. Or whatever notification agent the user have.

Yes you're right, a summary for notification and more details for other agents. It would be great if you could do that.

Thank you for considering my request :-)

  • Author
9 hours ago, Nonoss said:

Yes you're right, a summary for notification and more details for other agents. It would be great if you could do that.

Thank you for considering my request :-)

So I had some time after work to look at this, but I got a question for you. And for anyone else, too, for that matter. I'm not able to get it exactly how I want it, so I want to ask you guys what you think. The issue is with Unraid's notify system. Anything I put in the description will be displayed in the web UI, and it will also be automatically sent to any notification agents. The problem is that the unraid notification is formatted in html, and the message sent to the agents is not. So I can put a detailed notification summary pop-up like this:

Screenshot 2025-08-24 223743.png

But then the message in the agents (or at least email) will be like this, improperly formatted: Here I have also added the correct formatting in the message itself. That's why it's duplicated. And the log is missing from this example, but it's in the end.

Event: Disk Space Management
Subject: Run Summary
Description: Run finished. Total moved: 192.00GB in 13 items.. . <b>DRY RUN: No files were actually moved.</b>. . Start: 2025-08-24 22:01:59. End:   2025-08-24 22:02:02. . <b>--- Disk Summary ---</b>.  - Moved 94.00GB from disk9 to disk5. New free space on disk9 is ~151GB..  - Moved 12.00GB from disk1 to disk5. New free space on disk1 is ~66GB..  - Moved 4.00GB from disk17 to disk5. New free space on disk17 is ~60GB..  - Moved 14.00GB from disk10 to disk5. New free space on disk10 is ~72GB..  - Moved 19.00GB from disk14 to disk5. New free space on disk14 is ~70GB..  - Moved 18.00GB from disk13 to disk5. New free space on disk13 is ~68GB..  - Moved 18.00GB from disk12 to disk5. New free space on disk12 is ~77GB..  - Moved 13.00GB from disk11 to disk5. New free space on disk11 is ~63GB..
Importance: normal

DRY RUN: No files were actually moved.

Start: 2025-08-24 22:01:59
End:   2025-08-24 22:02:02

--- Disk Summary ---
 - Moved 94.00GB from disk9 to disk5. New free space on disk9 is ~151GB.
 - Moved 12.00GB from disk1 to disk5. New free space on disk1 is ~66GB.
 - Moved 4.00GB from disk17 to disk5. New free space on disk17 is ~60GB.
 - Moved 14.00GB from disk10 to disk5. New free space on disk10 is ~72GB.
 - Moved 19.00GB from disk14 to disk5. New free space on disk14 is ~70GB.
 - Moved 18.00GB from disk13 to disk5. New free space on disk13 is ~68GB.
 - Moved 18.00GB from disk12 to disk5. New free space on disk12 is ~77GB.
 - Moved 13.00GB from disk11 to disk5. New free space on disk11 is ~63GB.

--- Log From Current Run (Last 200 Lines) ---

Or I can put a very short notification like this in the webUI:

image.png

Then the message to the agents will look like this:

Event: Disk Space Management
Subject: Run Summary
Description: Run finished. Total moved: 192.00GB in 13 items. DRY RUN.
Importance: normal

DRY RUN: No files were actually moved.

Start: 2025-08-24 22:32:55
End:   2025-08-24 22:32:58

--- Disk Summary ---
 - Moved 94.00GB from disk9 to disk5. New free space on disk9 is ~151GB.
 - Moved 12.00GB from disk1 to disk5. New free space on disk1 is ~66GB.
 - Moved 4.00GB from disk17 to disk5. New free space on disk17 is ~60GB.
 - Moved 14.00GB from disk10 to disk5. New free space on disk10 is ~72GB.
 - Moved 19.00GB from disk14 to disk5. New free space on disk14 is ~70GB.
 - Moved 18.00GB from disk13 to disk5. New free space on disk13 is ~68GB.
 - Moved 18.00GB from disk12 to disk5. New free space on disk12 is ~77GB.
 - Moved 13.00GB from disk11 to disk5. New free space on disk11 is ~63GB.

--- Log From Current Run (Last 200 Lines) ---

I personally like the notification from option one, but really dislike the duplicate and improper formatting in the message to the agents. I can, of course, remove the duplicate, but then only the improper formatting will be left. It seems I can't get it exactly perfect the way that I want it. But what do you guys think, which is better? I need to make some sort of compromise here.

I agree. Personally, I also prefer option 1.

I think the duplicate and improper formatting part in the message isn't too annoying for me.

Hey, i really like the Plugin, but the plugin doesn't run on schedule for me. I still have the same settings as shown in my first post here, so nothing changed, it's still though not working. Tried updating, but nothing either.

I just noticed it, because my storage on a disk was filling up over the threshold, and I was wondering, why this happened with the script, and then notices it didn't run automatically since I configured it after first installation

  • Author
44 minutes ago, Joly0 said:

Hey, i really like the Plugin, but the plugin doesn't run on schedule for me. I still have the same settings as shown in my first post here, so nothing changed, it's still though not working. Tried updating, but nothing either.

I just noticed it, because my storage on a disk was filling up over the threshold, and I was wondering, why this happened with the script, and then notices it didn't run automatically since I configured it after first installation

Are you on the latest version? Try to enable dry run and change the schedule to run a minute after you have done that, to check if it fires off. If it works just disable dry run and set the schedule back to what you want.

There was an issue with the cron job in an earlier version, but it was fixed.

Hey, thanks for the response. So re-configuring the cron schedule seems to have fixed the problem. I am not sure what happened, in the logs I can only see, that the automated run was last time executed 25.07.2025. But it seems to be starting now again properly. Will have to check if my it runs tonight.

Another question, is it possible to configure additional paths? Would be nice for more generic stuff to have the option

Edited by Joly0

  • Author
4 hours ago, Joly0 said:

Hey, thanks for the response. So re-configuring the cron schedule seems to have fixed the problem. I am not sure what happened, in the logs I can only see, that the automated run was last time executed 25.07.2025. But it seems to be starting now again properly. Will have to check if my it runs tonight.

Awesome. Yeah, I broke the cron schedule a while back. Fixed it, but the setting needed to be reapplied like you just did.

4 hours ago, Joly0 said:

Another question, is it possible to configure additional paths? Would be nice for more generic stuff to have the option

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?

New update is out btw, with the new notification and some small changes. @Nonoss

Thank's @strike that's exactly what I needed, when there's nothing to move, and when the plugin move files 👍

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 ?


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.