[Plugin] Mover Tuning


572 posts in this topic Last Reply

Recommended Posts

2 hours ago, questionbot said:

If you install and use this plugin.. do I need to somehow remove the old schedule method unraid uses by default? Or do I just install this and I'm good?

Install, go to the Scheduler page, select your schedule (Hit Apply under Mover Settings), then set at least one item in the mover tuning setting (Hit Apply under Mover Tuning w/Age - Days Old)

Link to post
  • Replies 571
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

CA Mover Tuning       A simple little plugin (mainly created for my own purposes) that will let you fine tune the operation of the mover script On scheduled runs of mover, o

I would suggest removing the plug in, then moving everything.   I'm working on getting a Dev box up and running so I can continue working on this for the new Beta.

The flash drive doesn't support executable permissions.  You have to copy the file(s) to somewhere in RAM (say /tmp) and then execute it from there (after applying executable perms to the copy)

Posted Images

46 minutes ago, hugenbdd said:

Install, go to the Scheduler page, select your schedule (Hit Apply under Mover Settings), then set at least one item in the mover tuning setting (Hit Apply under Mover Tuning w/Age - Days Old)

Does this also apply to the force move?

Link to post
5 hours ago, questionbot said:

If you install and use this plugin.. do I need to somehow remove the old schedule method unraid uses by default? Or do I just install this and I'm good?


Install and your good. ;)
 

The plugin uses the built in scheduler from the old method. So yes you need to make sure you keep the old schedule so the new method plug-in knows how often to run or in this case how often to run/check for whatever settings you have enabled in the mover tuner. The old version is part of the OS so there isn’t a safe method to remove it unless you command prompt in and delete it. Not recommended because this plugin uses the scheduler and allows for returning back to default mover by simply removing the plugin if you choose to later. 
 

For example. I have Plex scheduled to run it’s maintenance at 6am-8am so I have the mover set to check daily at 5:45am. If it moves something it’s often a file or 2 and then it’s a drive or two less than Plex has to spin up. If it moves nothing then Plex does it’s thing anyways. 
 

I used to run weekly Sunday at 12:05am, but now I run daily and let the mover script determine if my files are 15days old or not. I might reduce to 7 days just because, but 15 sounded good. Lol 

 

 

Link to post
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.

Link to post
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
Link to post
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.

Link to post
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.

Link to post

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!

Link to post
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.

Link to post

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!)

Link to post
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!

Link to post
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

Link to post
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.

Link to post
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.

Link to post
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?

Link to post
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.

Link to post
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?

Link to post
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!

Link to post
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?

 

 

Link to post
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)

Link to post

@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. 

Link to post

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.

Link to post
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)

Link to post

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.