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.

[Request] Hard Drive usage leveller plugin

Featured Replies

Hi,

 

I have seen talk of this before on the forum but would it be possible for someone to create a plugin that moves files to different drives to level out the usage of each drive but still in accordance with your split level, etc?

 

Is it needed? I have a few HDD's at 90% and others at 20% and these will increase due to tv shows that are still running, etc

 

I can't code (not unix anyway) and have no test bed anyway

I would be hesitant to write such a plug-in, messing directly with users data is very touchy, I'd hate to miss a colon and you miss your collection.

  • Author

I would be hesitant to write such a plug-in, messing directly with users data is very touchy, I'd hate to miss a colon and you miss your collection.

 

I understand there is this possibility, but wouldn't any plugin generally have this capability without proper testing?

In theory yes, but in practicality no. For instance my plug-ins never write directly to the array unless the user sets the data directory to the array, in which case it only creates a directory and the app creates its files there. I never move or delete anything. Even when upgrading the app from the plug-in, I issue a "cp -Rfu" which updates recursively, forced(meaning even if it exists) and u = update only, meaning only update files that have changed. So it has very, very little chance to mess with data unless you are so unlucky your files are named exactly what the installation files from the apps are.

 

Probably the safest way would be to move the directories and do a checksum to make sure everything has been moved correctly before deleting it from the source. The share would have to have the cache disk disabled or you'd run the risk of filling up the cache disk, and the most efficient method would be to move to the user shares and let unraid and fuser shfs figure out where to put the data.

Seems to me the best way to keep balanced drives is to change from the High Water allocation method to Most Free. 

 

Caveat:

I probably wouldn't do this without a cache drive because then the disk which is "most free" will possibly be different each and every time you write to the array forcing all the disks to spin up/down constantly (assuming you are doign a lot of writing).  Further, you might end up with files randomly spread around that perhaps should be together (like songs in an album) which will then force the disks to again all spin up/down while listrning to your music.  Despite the OCD need to fill disks evenly, and the data safety reason of minimizing risks during a dual drive failure, the benefit to keeping as many "like" files on a single disk is reduced power and wear frmo power cycling.

 

That said ... at least with a cache drive an entire day's worth of writes will be moved to THE most free disk at once.  Tomorrow it might be the same disk still, it might not.  But at least you'r only doing moves to a single disk at a time and the most unbalanced your disks can get is one days worth of writes at a time.  You also have a better chance of related files ending up on the same disk

 

Caveat 2: as for similar files being on the same disk ... this can be somewhat mitigated, at the expense of perfect balance, by choosing a split level that might avoid splitting things like music album or TV episodes within a given season.  Preventing splits between seasons would seems overkill.

 

If you are currently out of balance ... pick a few folders from one drive and move them to another to get them all close to balanced.  It doesn't have to be perfect, just close, and then the "Most Free" allocation method will finish the job over time as you write to the array.

 

If you're like me, I write enough data over a given time frame that my server was self-balanced in very short order without even doing a manual rebalance.  By that I mean, at one point my server was very out of balance, I changed the allocation method, did NOT do a manual rebalance, and very soon after I noticed all my drives were fairly level.

Archived

This topic is now archived and is closed to further replies.

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.