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] Mover Tuning

Featured Replies

Would it be possible to allow 'Move files that are greater than this many days old' to be 1-7, and then by 5s? I'd really like to be able to keep things on there for a week.

 

edit: Or maybe even make it an input box?

Edited by flyize

  • Replies 3.6k
  • Views 517.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • hugenbdd
    hugenbdd

    New Version 07-03-2023   HUGE thanks/Shout-out to @Swarles for the help with updating code fixes and adding a great new feature.  You can now have some customization per share.  It's great t

  • How to ignore a SINGLE file 1.) Find the path of the file you wish to ignore.     ls -ltr /mnt/cache/Download/complete/test.txt         root@Tower:/# ls -ltr /mnt/cache/Download/complete/test

  • Hi all, I made a new version of the plugin. This fork replaces @hugenbdd's plugin which is not maintained anymore and will land in community applications if your feedbacks are positive.  

Posted Images

21 hours ago, flyize said:

Would it be possible to allow 'Move files that are greater than this many days old' to be 1-7, and then by 5s? I'd really like to be able to keep things on there for a week.

 

edit: Or maybe even make it an input box?

I can add some more single digits.  Working on some back-end changes.  Will be a week or two before I get the next release out.

###2020.05.06

- Added 0 to options of days old. (Will move anything greater than 24 hours old)

- Added 6,7,8,9 to options of days old.

- Increased days old limit to 765

- Removed "Original Mover" button after paypal donation link.

- Added "Move Now button follows plug-in filters:" to make "Move Now" button run based off of plug-in settings (Yes), or run original mover (No).

- Moved some code around in mover.php so ionice would be initiated.

- Updated mover code for moving from array to cache (generally cache-prefer) to follow Squid's update on 4/11/2021. (Fix for shares with space in their name)

 

 

 

 

**********CAUTION****************

Move Now button now calls unraids original move now code!!!!!  It will move almost everything, to change set Yes to "

Move Now button follows plug-in filters:" (Last question in section)

 

Future Changes:

Add an option to invoke original mover (i.e. everything) if percent used reaches a user selectable percent. (Must be higher than the entry for "Only move at this threshold of used cache space:")

Sorry if this has been covered, but does the plugin work with multiple pools? Any gotchas?

Thanks.

6 hours ago, tjb_altf4 said:

Sorry if this has been covered, but does the plugin work with multiple pools? Any gotchas?

Thanks.

Yes works with multiple pools.  

Gotcha's?

1.) Try to avoid spaces in share or pool names.

2.) All fields from gui are applied to all pools.  i.e. it's all the same.  with one exception at the moment.

2a.) You can specify a different percentage per pool.   

Create an entry in ca.mover.tuning.cfg file. (example: /boot/config/plugins/ca.mover.tuning             cachetv="65")

- "cachetv" being the name of the pool.

- if using single digits leading zero required. (i.e. cachetv="01" for 1 percent)

3.) I plan to expand this type of entry for a few other fields in the future. 

4.) As with any share setting, be very careful when setting cache-prefer.  Several posts where users are filling up their cache drive when using that setting.

2 minutes ago, hugenbdd said:

As with any share setting, be very careful when setting cache-prefer. 

Any way you could intercept that setting in your plugin and inform the user if the total of data in that share is larger than the designated pool size? I feel that would at least warn people that they may be in for a bad time if they proceed.

1 minute ago, jonathanm said:

Any way you could intercept that setting in your plugin and inform the user if the total of data in that share is larger than the designated pool size? I feel that would at least warn people that they may be in for a bad time if they proceed.

Partially

To do it right, it would take some effort.  I can't just check the share size, but have to check each drive for the share, then add up it's size on disks.  And after that, then I can only throw an error to syslog and then not "move" any data.

1 hour ago, hugenbdd said:

not "move" any data.

That's not ideal, as I can envision a situation where you want as much as possible of a set of files on the pool restricted by the free space setting.

 

I was hoping for a warning that alerts the user that they may not actually want that setting, but allow it if forced.

To use the mover script do I point to just the folder or to the folder/file name? Also, is a preexisting user script the correct format so I could just turn off the schedule for it and point mover tuner to that?  I'm utilizing the scripts to stop my torrent container before mover and restart afterwards so that seeding torrents are moved to the array. 

Edited by mmag05

4 hours ago, mmag05 said:

To use the mover script do I point to just the folder or to the folder/file name? Also, is a preexisting user script the correct format so I could just turn off the schedule for it and point mover tuner to that?  I'm utilizing the scripts to stop my torrent container before mover and restart afterwards so that seeding torrents are moved to the array. 

I don't understand your question.

 

Install the plug-in through CA community Apps, search for "Mover Tuner" and it should come up.

 

To run scripts before and after, fill in the full path to the file you want run and make sure it has execution permissions.

New Release

 

2020.05.13

  • Fixed issue during a mover stop command, where it wasn't exiting correctly.
  • Added Test mode.  - Will run the find command outputting all the files that would have been sent to mover to the syslog if logging enabled. (Lets you see if your filter choices are correct.)
  • Add "Move All" files in a share of cache-yes to the array if cache pool is above a certain % (Must be greater than "Only move at this threshold of used cache space:"
    • Plug-in code will still run through each share after this function.  However, it shouldn't move anything if a share path on cache is empty.
       

Some big changes.  I tested as best I could, please let me know if you run into issues. 

Now that test mode is nice!!! I've been bumping up my days just to see if it'll move something and then restoring it to the days I want them to remain after I watched it move files. 

 

Meaning in English, thanks for the add. I wish I had it earlier, but now we have it. ;)

1 hour ago, kizer said:

Now that test mode is nice!!! I've been bumping up my days just to see if it'll move something and then restoring it to the days I want them to remain after I watched it move files. 

 

Meaning in English, thanks for the add. I wish I had it earlier, but now we have it. ;)

Yeah, I was tired of commenting out the line in the age_mover file while testing.  Figured it would help people who have complicated filters. 

 

Side note, it will call the "before/after scripts".  The test mode just won't send files to mover, it just executes the "custom find command".

Thank you for this! Is there a way to set it so that it auto moves from cache->array (ie. auto press move) if the cache disk utilization is above x percent?

5 hours ago, Choohoo said:

Thank you for this! Is there a way to set it so that it auto moves from cache->array (ie. auto press move) if the cache disk utilization is above x percent?

Kind of.

You have to set the schedule to run every hour or daily.  This plug-in does not monitor the size of the cache except when it is run on a schedule. (So hourly, daily, weekly, etc)

 

Is there a setting that has the mover run when shutting down the array? because I was trying to turn off my server but the mover started when pressing stop and is moving everything now... is this a new setting or something? I don't recall this happening before.

 

syslog:

May 15 15:52:34 Unraid emhttpd: shcmd (7093746): rm -f /etc/avahi/services/smb.service
May 15 15:52:34 Unraid emhttpd: Stopping mover...
May 15 15:52:34 Unraid emhttpd: shcmd (7093748): /usr/local/sbin/mover stop
May 15 15:52:34 Unraid root: Starting Mover
May 15 15:52:34 Unraid root: Forcing turbo write on
May 15 15:52:34 Unraid kernel: mdcmd (107): set md_write_method 1
May 15 15:52:34 Unraid kernel: 
May 15 15:52:34 Unraid root: ionice -c 2 -n 0 nice -n 0 /usr/local/sbin/mover.old 
May 15 15:52:34 Unraid root: mover: started

 

Edited by radwimp

There was a bug reported in the plugin that could cause this but I thought it was now fixed.   Are you sure you are on the latest version of the plugin?

26 minutes ago, itimpi said:

There was a bug reported in the plugin that could cause this but I thought it was now fixed.   Are you sure you are on the latest version of the plugin?

Oh, my bad. I was on the version just previous. I'll update. This was a minor bug, or would my data be weird since the array was trying to turn off? Thanks.

23 hours ago, radwimp said:

Oh, my bad. I was on the version just previous. I'll update. This was a minor bug, or would my data be weird since the array was trying to turn off? Thanks.

Your data "should" be okay.  If the array shutdown during a move, it's possible the file that the mover binary was in the process of sending to the array might be corrupt, but I doubt that all the files in your cache are corrupt.

 

Latest release did fix this issue.

On 5/13/2021 at 1:55 PM, hugenbdd said:

Added Test mode.  - Will run the find command outputting all the files that would have been sent to mover to the syslog if logging enabled. (Lets you see if your filter choices are correct.)

 

This sounds great, but where does it show the output of the find command?

8 minutes ago, acosmichippo said:

 

This sounds great, but where does it show the output of the find command?

Added Test mode.  - Will run the find command outputting all the files that would have been sent to mover to the syslog if logging enabled. (Lets you see if your filter choices are correct.)

19 minutes ago, acosmichippo said:

 

This sounds great, but where does it show the output of the find command?

upper right log icon/link 

or if in the console....

/var/log/syslog

 

But like Simon F mentioned, make sure logging is enabled and you have it in test mode. (One of the last options in schedule page for the plug-in.)

ah, logging.  duh.

So I'm having a weird issue and I've already tried reinstalling the plugin to no avail. For some reason, the plugin is reading the folder names on the cache drive incorrectly. As you can see in the attached log, the mover tries to mount /mnt/cache/STORAGE even though my share name is Storage. It also tries to mount /mnt/cache/media even though my share name is Media. This leads to the mover just not running at all. In an attempt to fix, I tried making a symbolic link for media->Media (I don't actually use Storage right now so I don't really care about that one) which is why you see media in my shares and the log says it finds it, but it still won't move any files. Please help and thanks in advance. Let me know if you need any more info or logs.

 

P.S. For generating the log on command I have the "Move Now button follows plug-in filters:" set to yes but usually have it set to no. When set to no, the mover button works as it should and all files that should be moved get moved.

MoverTuningLog.png

Shares.png

MoverTuningSettings.png

1 hour ago, rcm024 said:

So I'm having a weird issue and I've already tried reinstalling the plugin to no avail. For some reason, the plugin is reading the folder names on the cache drive incorrectly. As you can see in the attached log, the mover tries to mount /mnt/cache/STORAGE even though my share name is Storage. It also tries to mount /mnt/cache/media even though my share name is Media. This leads to the mover just not running at all. In an attempt to fix, I tried making a symbolic link for media->Media (I don't actually use Storage right now so I don't really care about that one) which is why you see media in my shares and the log says it finds it, but it still won't move any files. Please help and thanks in advance. Let me know if you need any more info or logs.

 

P.S. For generating the log on command I have the "Move Now button follows plug-in filters:" set to yes but usually have it set to no. When set to no, the mover button works as it should and all files that should be moved get moved.

MoverTuningLog.png

Shares.png

 

Can you post what your share config files are listed as?

 

There is a mis-match somewhere between the config files (Case) and the share names.

 

ls -ltr /boot/config/shares

 

If that doesn't fix it can you post your debug file?

 

original mover loops through the directory on the cache, where I have to loop through by config files.

 

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.