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

Is it possible to remove mover tuning with age and just have squid’s version of mover tuning? I really only want move by percentage and force move to work.

  • 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

34 minutes ago, wgstarks said:

Is it possible to remove mover tuning with age and just have squid’s version of mover tuning? I really only want move by percentage and force move to work.

Cron Schedule to force move all of files: - Runs original mover on a schedule if you want all files moved.

 

 

Only move at this threshold of used cache space:     <-- set to 0%.  This way if anything at all is on the disk, it should trigger a move and not put any "filters" on the find command.

 

With all the options I have, you can usually find a way for it to work for your needs.

30 minutes ago, hugenbdd said:

Cron Schedule to force move all of files: - Runs original mover on a schedule if you want all files moved.

 

 

Only move at this threshold of used cache space:     <-- set to 0%.  This way if anything at all is on the disk, it should trigger a move and not put any "filters" on the find command.

 

With all the options I have, you can usually find a way for it to work for your needs.

Thanks. I was just hoping to have this plugin working so I wouldn’t need the work arounds. Is there any way to get the move button on Main to work?

Edited by wgstarks
Corrected name of button

4 minutes ago, wgstarks said:

Thanks. I was just hoping to have this plugin working so I wouldn’t need the work arounds. Is there any way to get the move now button on Main to work?

I'm not familiar enough with the base pages of unRAID to change them.  The "original" move now is on the schedules page, bottom right.  Just right of the donate button.

3 minutes ago, hugenbdd said:

I'm not familiar enough with the base pages of unRAID to change them.  The "original" move now is on the schedules page, bottom right.  Just right of the donate button.

Sorry. Changed my post. Was referring to the broken Move button on main next to all the other server controls.

trying to use this plugin but i am a bit confused... so i want to set my mover to run every hour but it only to move files when they are 30 days old or the disk is 80% full.  so either or... is this possible?

 

also when selecting "yes" for "Move files off cache based on age?" it grays out the 2 boxes that look like they should work with it.  age and ctime.  am i reading this backwards?  selecting yes move but age should enable these 2 boxes not disable them right?  also what does use ctime instead of mtime actually do?  i just want the files to sit on the cache for 30 days and then move to a normal drive. 

 

Thanks!

  • Author
On 4/24/2021 at 2:08 PM, hugenbdd said:

I'm not familiar enough with the base pages of unRAID to change them.

Sent you a PM.  You don't need to modify anything to get Move Now to move everything now.  Simply need to detect if the script was started via cron or not.

It looks like the granularity for moving 'older' files is 1 day based on CTIME. I'd like to move files older than 1 hour based on CMIN. 

 

Am I not seeing a setting for this? If not, is there a work-around?

(awesome plugin!)

19 hours ago, Squid said:

Sent you a PM.  You don't need to modify anything to get Move Now to move everything now.  Simply need to detect if the script was started via cron or not.

 

Squid are you still maintaining this or is it someone else?  Just wondering why selecting yes for move when days old grays out the options that should be there to support it.  Or am I missing something?  Thanks!

2 hours ago, RackIt said:

It looks like the granularity for moving 'older' files is 1 day based on CTIME. I'd like to move files older than 1 hour based on CMIN. 

 

Am I not seeing a setting for this? If not, is there a work-around?

(awesome plugin!)

it's based on days.  I don't think many would use hours.

 

You could modify age_mover where ctime is created in the "find" string....  Or you could create your own mover command and put it in cron. 

 

# find "/mnt/cache/share1" -depth -cmin +60 | /usr/local/sbin/move -d 1

4 minutes ago, slikone27 said:

 

Squid are you still maintaining this or is it someone else?  Just wondering why selecting yes for move when days old grays out the options that should be there to support it.  Or am I missing something?  Thanks!

I'm maintaining it.  Set one option, then hit apply.  Refresh the schedule page and then try and set your options.

 

There is a bug on the first install/selection of settings (first time page loads) for why things are grayed out.  I have not tried to troubleshoot it as there is an easy work around.

21 hours ago, slikone27 said:

trying to use this plugin but i am a bit confused... so i want to set my mover to run every hour but it only to move files when they are 30 days old or the disk is 80% full.  so either or... is this possible?

 

also when selecting "yes" for "Move files off cache based on age?" it grays out the 2 boxes that look like they should work with it.  age and ctime.  am i reading this backwards?  selecting yes move but age should enable these 2 boxes not disable them right?  also what does use ctime instead of mtime actually do?  i just want the files to sit on the cache for 30 days and then move to a normal drive. 

 

Thanks!

 

No there is no either or for those options.  The percentage is the first general overall check.  If the cache/disk is not greather than the percentage set it basically exits for that cache drive.

1 minute ago, hugenbdd said:

 

No there is no either or for those options.  The percentage is the first general overall check.  If the cache/disk is not greather than the percentage set it basically exits for that cache drive.

Thanks! So is it an "AND" then?  So if I set 50% full and 30 days old... When it hits 50% full it will move everything 30 days or older off and leave the newer stuff on the drive?

6 minutes ago, slikone27 said:

Thanks! So is it an "AND" then?  So if I set 50% full and 30 days old... When it hits 50% full it will move everything 30 days or older off and leave the newer stuff on the drive?

Correct.

if Drive Space used greater than 50%, find file's greater than 30 days old and send them to the mover binary.

3 minutes ago, hugenbdd said:

Correct.

if Drive Space used greater than 50%, find file's greater than 30 days old and send them to the mover binary.

Thanks!  One last quick one... So if I wanted to move all files 30 days old always, can I just set the percent full to 0% and days to 30?

3 minutes ago, slikone27 said:

Thanks!  One last quick one... So if I wanted to move all files 30 days old always, can I just set the percent full to 0% and days to 30?

Yup

1 hour ago, hugenbdd said:

it's based on days.  I don't think many would use hours.

 

You could modify age_mover where ctime is created in the "find" string....  Or you could create your own mover command and put it in cron. 

 

# find "/mnt/cache/share1" -depth -cmin +60 | /usr/local/sbin/move -d 1

 

Perfect.. thanks!

1 hour ago, hugenbdd said:

it's based on days.  I don't think many would use hours.

 

You could modify age_mover where ctime is created in the "find" string....  Or you could create your own mover command and put it in cron. 

 

# find "/mnt/cache/share1" -depth -cmin +60 | /usr/local/sbin/move -d 1

 

Could I trouble you to break that command down just a bit?

 

I'm looking at share1 and then I see /move -d 1

 

I'm assuming share1 is just a place holder and could be anything TV Movies?

 

 

35 minutes ago, kizer said:

 

Could I trouble you to break that command down just a bit?

 

I'm looking at share1 and then I see /move -d 1

 

I'm assuming share1 is just a place holder and could be anything TV Movies?

 

 

find "/mnt/cache/share1" -depth -cmin +60 | /usr/local/sbin/move -d 1

 

The find command just creates a list of files matching your criteria.  <-- This is basically all the plug-in is doing, creating a long custom find command.

"/mnt/cache/share1" -  /mnt/cache   <--would be your cache pool name.  If you don't have multiple and have not renamed it, then it should have defaulted to cache.   /share1  <-- is the share that have any files on it.  Usually this would be TV or Movies, etc.  These shares usually have "yes" to the question of "Use cache pool (for new files/directories):" in their share page.

 

|   <- Pipe, just telling the command line to send the output of the find to the move binary.

 

/usr/local/sbin/move -d 1  <-- default move binary supplied by unRAID.

 

If you create a custom command, I would suggest also looking to see if mover is already running (i.e. check for the pid)

@hugenbdd Thanks for the break down. I thought I had it figured out and you more than covered it. 

 

So it looks like if you cancel the mover cron you could literally build a script and move individual shares using something as simple as User.Scripts if you need custom shares moved more or less frequently vs using this script to blanket move everything which may or may not work for people based on their needs. Personally Mover.Tuner does exactly what I need and thank you for keeping it going. 

 

I know one person asked this very question in another forum topic and now I'm glad I can point them and future people here so they can customize their moves if a need arises. 

I am on 6.9.2 and recently noticed that my cache drive was filling up and that mover wasn't doing anything. Mover tuning had pretty much everything set to "No" and the "Only move at this threshold of used cache space" set to 0%, but nothing would move. Didn't get anything to change until I set this to an actual percentage (I chose 30%) then ran mover. Is this a bug? I have been using for years without changing settings and not having errors.

5 minutes ago, aqua said:

I am on 6.9.2 and recently noticed that my cache drive was filling up and that mover wasn't doing anything. Mover tuning had pretty much everything set to "No" and the "Only move at this threshold of used cache space" set to 0%, but nothing would move. Didn't get anything to change until I set this to an actual percentage (I chose 30%) then ran mover. Is this a bug? I have been using for years without changing settings and not having errors.

Lots changed because of multiple cache pools.

 

I will test having 0% used and no other settings, but it should work. (Might take me a day or two)

16 hours ago, aqua said:

I am on 6.9.2 and recently noticed that my cache drive was filling up and that mover wasn't doing anything. Mover tuning had pretty much everything set to "No" and the "Only move at this threshold of used cache space" set to 0%, but nothing would move. Didn't get anything to change until I set this to an actual percentage (I chose 30%) then ran mover. Is this a bug? I have been using for years without changing settings and not having errors.

0% is working for me.

 

Can you do the follow.

1.) Verify you have the latest version installed. (2021.04.20)

2.) Settings: Mover Logging: Enabled

3.) Screen shot of your settings page.

4.) Post the section from your log file that looks similar to this after it runs.

Apr 27 08:35:48 Tower root: mvlogger: Age supplied
Apr 27 08:35:48 Tower root: mvlogger: Size supplied
Apr 27 08:35:48 Tower root: mvlogger: Sparness supplied
Apr 27 08:35:48 Tower root: mvlogger: No Skipfiles Argument Supplied
Apr 27 08:35:48 Tower root: mvlogger: No Skipfiles Argument Supplied
Apr 27 08:35:48 Tower root: mvlogger: No Before Script Argument Supplied
Apr 27 08:35:48 Tower root: mvlogger: No After Script Argument Supplied
Apr 27 08:35:48 Tower root: mvlogger: CTIME Argument: no
Apr 27 08:35:48 Tower root: mvlogger: *********************************MOVER START*******************************
Apr 27 08:35:48 Tower root: mover: started
Apr 27 08:35:48 Tower root: mvlogger: No Script to Run.
Apr 27 08:35:48 Tower root: mvlogger: Share Name Only: Backups
Apr 27 08:35:48 Tower root: mvlogger: Cache Pool Name: cache
Apr 27 08:35:48 Tower root: mvlogger: cache Threshold Pct:
Apr 27 08:35:48 Tower root: mvlogger: OVERALL Threshold: 0
Apr 27 08:35:48 Tower root: mvlogger: Share Path: /mnt/cache/Backups
Apr 27 08:35:48 Tower root: mvlogger: Pool Pct Used: 60 %
Apr 27 08:35:48 Tower root: mvlogger: DFTPCT LIMIT USED FOR SETTING: 0
Apr 27 08:35:48 Tower root: mvlogger: Threshold Used: 0
Apr 27 08:35:48 Tower root: mvlogger: Skipfiletypes string: find "/mnt/cache/Backups" -depth
Apr 27 08:35:48 Tower root: mvlogger: Complete Mover Command: find "/mnt/cache/Backups" -depth | /usr/local/sbin/move -d 1

Yes, was/am running 2021.04.20. I noticed yesterday that when I was checking settings, before changing to a percentage to make things run, I think I had tried setting by age and had a weird thing where if I had it on "No" then I could select the number of days but if I had it on "Yes" then that selection was greyed out. Anyways, it is working on 0% now when I tested it so I guess things are back to normal, though I don't know what the issue was.

 

So I am clear with the tuner, the mover settings schedule (set to daily) just invoke the mover and then the mover tuning settings get looked at to determine whether mover does anything, right? As I'm set now, I just want it to run ever night and move everything off the cache (except cache prefer) which is why I have things set to 0% and everything else set to no (except allowing mover to run during parity check/rebuild).

 

I think I had logging on for a bit when it wasn't working, but then disabled it later - would the logs for that still be available? I can try to dig them up if they would be useful - though I don't know that I've looked at logs before and am not immediately sure where to go to grab them.

15 minutes ago, aqua said:

Yes, was/am running 2021.04.20. I noticed yesterday that when I was checking settings, before changing to a percentage to make things run, I think I had tried setting by age and had a weird thing where if I had it on "No" then I could select the number of days but if I had it on "Yes" then that selection was greyed out. Anyways, it is working on 0% now when I tested it so I guess things are back to normal, though I don't know what the issue was.

 

So I am clear with the tuner, the mover settings schedule (set to daily) just invoke the mover and then the mover tuning settings get looked at to determine whether mover does anything, right? As I'm set now, I just want it to run ever night and move everything off the cache (except cache prefer) which is why I have things set to 0% and everything else set to no (except allowing mover to run during parity check/rebuild).

 

I think I had logging on for a bit when it wasn't working, but then disabled it later - would the logs for that still be available? I can try to dig them up if they would be useful - though I don't know that I've looked at logs before and am not immediately sure where to go to grab them.

 

So I am clear with the tuner, the mover settings schedule (set to daily) just invoke the mover and then the mover tuning settings get looked at to determine whether mover does anything, right?

Currently - This will likely change soon.  I plan to make the button have the option of using default unraid mover, or to follow the settings.  (Just working on initial code now based on Squid's recommendation).

 

Logging - Depending on the version, Logging might not have been "created".  Not sure it's worth going back and looking for it.  I have logging sorted out now so users can at least enable it and give me a good idea of what/where might be failing.

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.