Jump to content
jbrodriguez

[Plug-In] unBALANCE

1166 posts in this topic Last Reply

Recommended Posts

 

Introduction

unBALANCE is a plugin to transfer files/folders between disks in your array.

 

Support Fund

If you wish to do so, learn how to support the developer.

 

Videos

Thanks to gridrunner for his coverage of unBALANCE in one of his awesome videos

 

Must Have unRAID Plugins - Part 3 Disk Utility Plugins

(the discussion specific to unBALANCE starts here).

 

Description

unBALANCE helps you manage space in your unRAID array, via two different operating modes:

 

  • Scatter

Transfer data out of a disk, into one or more disks

 

  • Gather

Consolidate data from a user share into a single disk

 

It's versatile and can serve multiple purposes, based on your needs.

 

Some of the use cases are:

- Empty a disk, in order to change filesystems (read kizer's example)

- Move all seasons of a tv show into a single disk

- Move a specific folder from a disk to another disk

- Split your movies/tv shows/games folder from a disk to other disks

 

You'll likely come up with other scenarios as you play around with it.

 

Installation

There are 2 ways to install this application

 

- Apps Tab (Community Application)

Go to the Apps tab

Click on the Plugins button (the last one)

Look for unBALANCE

Click Install

 

- Plugins Tab (manual)

Go to the Plugins tab

Click on Install Plugin

Paste the following address in the input field: https://raw.githubusercontent.com/jbrodriguez/unraid/master/plugins/unbalance.plg

Click Install


Running the plugin

After installing the plugin, you can access the web UI, via the following methods:

 

- Method 1

Go to Settings > Utilities

Click on unBALANCE

Click on Open Web UI

 

- Method 2<br/>

Go to Plugins > Installed Plugins

Click on unBALANCE

Click on Open Web UI

 

- Method 3<br/>

Navigate with your browser to http://Tower:6237/ (replace Tower with the address/name of your unRAID server)<br/>

 

Check the github page for additional documentation

 

Changelog

 

v2019.02.19b (5.5.0)

 

This is overall a very small release.

 

There was a bug that prevented Reserved Space to be saved.

 

Also, rsync error 13 (Errors with program diagnostics) is now also
flagged so it won't stop the whole operation, you will still need
to check the logs as for the reasons of the error.

 

Changes:

 

- Allow ReservedAmount/ReservedUnit to be saved to disk
- Add error 13 as flagged command
- Core libraries updated

 

v2018.09.18a (5.4.0)

- Improve handling of protocol (http/https) based on Unraid's SSL settings
- Change unraid logo
- Round seconds to prevent display issues in History screen
- Fix CI issues

 

v2018.05.12 (5.2.0)

This release allows the user to customize the UI's refresh rate, when transferring data.

 

Also:
- Fix ssl cert detection

 

v2018.05.09 (5.1.0)

Available space is now calculated using blocks, if all disks have the same block size, otherwise it falls back to the current metric, using bytes.

 

You can now stop a running operation, but you are responsible for any data clean up.

 

Additional changes:
- Fix ssl detection
- Fix UI issues
- Increase hard floor to 512Mb
- Use SI's digital units
- Improve logging

 

v2018.02.27 (5.0.0)

This release improves rsync execution handling.

 

Any rsync command that generates a code 23 error will be flagged and the source files/folders it refers to, will not be deleted.

 

Use the History page and the log file (/boot/logs/unbalance.log), to check which commands had issues and act accordingly.

 

Once the issue is solved, you can remove the source files/folders, using the 'rmsrc' button in the History page.

 

Also, although the rsync default flags are the same (-avPRX), you can now remove the 'X' flag, if you want.

 

Additional changes:
- Implement /proc based rsync monitoring
- Enable https support
- Fix floating footer issue
- Use date-based version

 

More details can be found on github.

 

The full changelog can be found here

 

 

Edited by jbrodriguez
  • Like 2
  • Upvote 5

Share this post


Link to post

Just tried to install this and it comes up as a bad file.

unBALANCE_Bad_File_Error.png.e2823af04c5e6e5983528886125d63e0.png

Share this post


Link to post

I've decided to distribute unBALANCE as a plugin rather than a docker.

 

The main reason is to have better access to unRAID's filesystem, something that is more difficult with Docker (you'd have to mount a lot of volumes and even then, some features would have some issues).

Not that I am against this being released as a plugin, but surely if you had it as a docker with /mnt internally mapped to /mnt externally (and possibly a mapping for /boot) you would have full access to all the physical media?

 

Having said that since it is basically a script it does not have the sort of dependency issues that are the main reason for NOT installing some apps as a plugin.  It therefore does not put system stability at risk.

Share this post


Link to post

I've decided to distribute unBALANCE as a plugin rather than a docker.

 

The main reason is to have better access to unRAID's filesystem, something that is more difficult with Docker (you'd have to mount a lot of volumes and even then, some features would have some issues).

Not that I am against this being released as a plugin, but surely if you had it as a docker with /mnt internally mapped to /mnt externally (and possibly a mapping for /boot) you would have full access to all the physical media?

 

Having said that since it is basically a script it does not have the sort of dependency issues that are the main reason for NOT installing some apps as a plugin.  It therefore does not put system stability at risk.

IMHO, I always questioned why unBalance was a docker in the first place.  To me, the function that it performs is philosophically (for lack of a better word) a plugin type rather than a docker.

Share this post


Link to post

I have just tried to install the unBALANCE plugin on my Main unRAID server both manually and via CA and unfortunately the installation failed.

 

The error I just captured from CA is:

 

plugin: bad file MD5: /boot/config/plugins/unbalance/unbalance-1.2.11.tgz

 

Looking forward to using the plugin when I can. Looks excellent.

Share this post


Link to post

I have just tried to install the unBALANCE plugin on my Main unRAID server both manually and via CA and unfortunately the installation failed.

 

The error I just captured from CA is:

 

plugin: bad file MD5: /boot/config/plugins/unbalance/unbalance-1.2.11.tgz

 

Looking forward to using the plugin when I can. Looks excellent.

 

Getting the same error

Share this post


Link to post

I didn't actually release 1.2.11 in github, that's the reason for the error ( I was testing the md5 check ;D ).

 

I've published it and it installs correctly now.

 

I'm also creating a page to be able to access the UI from unRAID's interface (just a link to the url for unBALANCE).

Share this post


Link to post

I've decided to distribute unBALANCE as a plugin rather than a docker.

 

The main reason is to have better access to unRAID's filesystem, something that is more difficult with Docker (you'd have to mount a lot of volumes and even then, some features would have some issues).

Not that I am against this being released as a plugin, but surely if you had it as a docker with /mnt internally mapped to /mnt externally (and possibly a mapping for /boot) you would have full access to all the physical media?

 

Having said that since it is basically a script it does not have the sort of dependency issues that are the main reason for NOT installing some apps as a plugin.  It therefore does not put system stability at risk.

IMHO, I always questioned why unBalance was a docker in the first place.  To me, the function that it performs is philosophically (for lack of a better word) a plugin type rather than a docker.

 

itimpi,

 

To use unRAID's notification system from within a Docker, I'd have needed to mount /usr/local, then probably somewhere in /etc, in addition to /mnt, /boot and others like you mentioned.

 

And even so, there was the issue of Docker volume mapping behaviour:

- It didn't recognize when a disk was formatted or recently installed.

- It didn't recognize Apple Time Machine backups

 

At the end of the day, either Docker or plugin is just a distribution mechanism. It is easier to create a docker over a plugin, but not by that much. It has to do with docker being more documented.

 

With CA, the difference between them becomes really blurry.

 

You also mentioned something very important.

 

unBALANCE is just a standalone binary that exposes an API interface, it has no dependencies that could bloat the base system.

Share this post


Link to post

Where can you access the settings? I've checked the usual places.

Share this post


Link to post

Installed plugin.  All user shares disappeared from the Shares tab.  Rebooted and they were still gone.  Uninstalled plugin and rebooted and they came back.

Share this post


Link to post

Installed plugin.  All user shares disappeared from the Shares tab.  Rebooted and they were still gone.  Uninstalled plugin and rebooted and they came back.

Strange.. They are still there for me.

Share this post


Link to post

I've uploaded version 1.2.12.

 

I'm still learning how the plugin system works, so please bear with me for the next few days  ;D

 

I've added the settings page, but it's not fully working yet. I'll keep looking into it.

 

For now, stop/start the array to get the app running, then go to http://IP:6237/

Share this post


Link to post

I've uploaded version 1.2.12.

 

I'm still learning how the plugin system works, so please bear with me for the next few days  ;D

 

I've added the settings page, but it's not fully working yet. I'll keep looking into it.

 

For now, stop/start the array to get the app running, then go to http://IP:6237/

your unbalance.page is trying to put the icon on the UserUtilities menu.  It should actually be Utilities  (That reference tells dynamix to find the Utilities.page file which is an OS file and put the icon there. 

 

Once that's fixed, then you've got an issue with the size of the icon.  (The icons displayed by dynamix aren't resized automatically and have to be the correct size (I believe 48x48).  Note that this is the local version of the icon.  The URL you use in the template for CA can be any size (as it resizes everything to 96x96)

 

Share this post


Link to post

Installed unBALANCE 1.2.12 on unRAID 6.1.6 and it installs, but can't seem to get it to run when visiting <serverIP>:6237.

 

Screenshot of the plugin page:

dw7egMbW0d.png

 

Nothing that I can see in the logs.

Share this post


Link to post

Installed unBALANCE 1.2.12 on unRAID 6.1.6 and it installs, but can't seem to get it to run when visiting <serverIP>:6237.

 

Screenshot of the plugin page:

dw7egMbW0d.png

 

Nothing that I can see in the logs.

 

I get the same results.

 

...

 

For now, stop/start the array to get the app running, then go to http://IP:6237/

 

This still does not resolve. I have even tried a reboot, same results. Removing plug-in for now.

Share this post


Link to post

I've uploaded version 1.2.12.

 

I'm still learning how the plugin system works, so please bear with me for the next few days  ;D

 

I've added the settings page, but it's not fully working yet. I'll keep looking into it.

 

For now, stop/start the array to get the app running, then go to http://IP:6237/

your unbalance.page is trying to put the icon on the UserUtilities menu.  It should actually be Utilities  (That reference tells dynamix to find the Utilities.page file which is an OS file and put the icon there. 

 

Once that's fixed, then you've got an issue with the size of the icon.  (The icons displayed by dynamix aren't resized automatically and have to be the correct size (I believe 48x48).  Note that this is the local version of the icon.  The URL you use in the template for CA can be any size (as it resizes everything to 96x96)

 

Thank you Squid, yeah ... that was part of the problem :)

Share this post


Link to post

Ok, I think I solved the UI and startup issues with version 1.2.14.

 

Let me know of any issues.

Share this post


Link to post

Nice work lboregard! I'll test moving some data around. The icon sizing needs some work though:

ZBnbSX1URM.png

 

Thanks jamescarlos !

 

As for the icon size, I thought I had _specifically_ solved that issue  :o

 

Is it possible that your browser is reading the old copy of the image (it was that big before).

 

Can you try a hard refresh (Cmd + R on a Mac, I think it's Ctrl + R on Windows), and let me know if that solves it ?

Share this post


Link to post

Nice work lboregard! I'll test moving some data around. The icon sizing needs some work though:

 

Thanks jamescarlos !

 

As for the icon size, I thought I had _specifically_ solved that issue  :o

 

Is it possible that your browser is reading the old copy of the image (it was that big before).

 

Can you try a hard refresh (Cmd + R on a Mac, I think it's Ctrl + R on Windows), and let me know if that solves it ?

 

Indeed, it was Chrome that was caching the previous icon. Looks splendid now!

Share this post


Link to post

Has anyone tried this Plugin since it was in fact moved to a Plugin from a Docker?

 

Just not sure if we are treating this as a BETA Plugin or if it is good to go to use in a Production env?

Share this post


Link to post

I'm running it at the moment, evacuating a 3TB Red that's sounding very ill.  I'll let you know the results.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now