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

Attached is a new "age_mover" which has the echo/log statements in it to help trouble shoot.  Please replace the age_mover with this file if you have trouble.

 

make a backup of the age_mover file

cd /usr/local/emhttp/plugins/ca.mover.tuning/

cp age_mover age_mover_original

 

copy the new file attached to this post to same location

/usr/local/emhttp/plugins/ca.mover.tuning/

age_mover

  • 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

On 3/25/2021 at 10:32 AM, hugenbdd said:

Attached is a new "age_mover" which has the echo/log statements in it to help trouble shoot.  Please replace the age_mover with this file if you have trouble.

 

make a backup of the age_mover file

cd /usr/local/emhttp/plugins/ca.mover.tuning/

cp age_mover age_mover_original

 

copy the new file attached to this post to same location

/usr/local/emhttp/plugins/ca.mover.tuning/

age_mover 8.08 kB · 1 download

 

I'm getting the same log output with that file.  Assuming I don't need to reboot or anything after replacing.  I also ensured the permissions were the same as the original as well.

 

//edit// I lied.  I enabled the standard Unraid mover logging and I got some output.

 

Mar 27 22:25:06 Goliath root: Manually starting mover
Mar 27 22:25:06 Goliath root: Forcing turbo write on
Mar 27 22:25:06 Goliath kernel: mdcmd (95): set md_write_method 1
Mar 27 22:25:06 Goliath kernel:
Mar 27 22:25:06 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 27 22:25:06 Goliath root: *********************************MOVER START*******************************
Mar 27 22:25:06 Goliath root: mover: started
Mar 27 22:25:06 Goliath root: Share Name Only: ((omitted))
Mar 27 22:25:06 Goliath root: Cache Pool Name:
Mar 27 22:25:06 Goliath root: No shareCachePool entry found in config file, defaulting to cache
Mar 27 22:25:06 Goliath root: cache Threshold Pct:
Mar 27 22:25:06 Goliath root: OVERALL Threshold: 65
Mar 27 22:25:06 Goliath root: Share Path: /mnt/cache/((omitted))
Mar 27 22:25:06 Goliath root: Pool Pct Used: 54 %
Mar 27 22:25:06 Goliath root: DFTPCT LIMIT USED FOR SETTING: 65
Mar 27 22:25:06 Goliath root: Threshold Used: 65
Mar 27 22:25:06 Goliath root: Mover not Needed.

Getting that for every share.  So it seems that instead of moving anyway, it's still obeying the cache space used requirement.  If I remember correctly, that didn't use to be the case.  But I'm not positive.

Edited by my95z34
adding info

14 hours ago, my95z34 said:

 

I'm getting the same log output with that file.  Assuming I don't need to reboot or anything after replacing.  I also ensured the permissions were the same as the original as well.

 

//edit// I lied.  I enabled the standard Unraid mover logging and I got some output.

 


Mar 27 22:25:06 Goliath root: Manually starting mover
Mar 27 22:25:06 Goliath root: Forcing turbo write on
Mar 27 22:25:06 Goliath kernel: mdcmd (95): set md_write_method 1
Mar 27 22:25:06 Goliath kernel:
Mar 27 22:25:06 Goliath root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start 0 0 0 '' ''
Mar 27 22:25:06 Goliath root: *********************************MOVER START*******************************
Mar 27 22:25:06 Goliath root: mover: started
Mar 27 22:25:06 Goliath root: Share Name Only: ((omitted))
Mar 27 22:25:06 Goliath root: Cache Pool Name:
Mar 27 22:25:06 Goliath root: No shareCachePool entry found in config file, defaulting to cache
Mar 27 22:25:06 Goliath root: cache Threshold Pct:
Mar 27 22:25:06 Goliath root: OVERALL Threshold: 65
Mar 27 22:25:06 Goliath root: Share Path: /mnt/cache/((omitted))
Mar 27 22:25:06 Goliath root: Pool Pct Used: 54 %
Mar 27 22:25:06 Goliath root: DFTPCT LIMIT USED FOR SETTING: 65
Mar 27 22:25:06 Goliath root: Threshold Used: 65
Mar 27 22:25:06 Goliath root: Mover not Needed.

Getting that for every share.  So it seems that instead of moving anyway, it's still obeying the cache space used requirement.  If I remember correctly, that didn't use to be the case.  But I'm not positive.

okay, this helps alot!

This looks normal.  The  "Move Now" under the "Mover Settings" in Scheduler, calls the plug-in.  This is a change from 6.8 version.  Your cache pool is never getting above the 65% limit to initiate a move.  So it doesn't move anything.

 

If you want to run the original mover.  I added a button in the bottom right of the "Mover Tuning w/Age - Days old" area.  Bottom right.  This will just call the original mover script that came with unRAID.  

 

image.thumb.png.2cdddeb11061fe6d886d2ce653ac6bde.png

27 minutes ago, hugenbdd said:

Your cache pool is never getting above the 65% limit to initiate a move.  So it doesn't move anything.

I just want to confirm that “Force move of all files on a schedule” will still move all files even if the percentage threshold hasn’t been met?

 

One other question, is it still necessary to set a schedule in Mover Settings>Mover Schedule to run the checks in Mover Tuning with Age - Days Old? There have been so many changes recently that my old brain can’t keep up.😁

36 minutes ago, wgstarks said:

I just want to confirm that “Force move of all files on a schedule” will still move all files even if the percentage threshold hasn’t been met?

 

One other question, is it still necessary to set a schedule in Mover Settings>Mover Schedule to run the checks in Mover Tuning with Age - Days Old? There have been so many changes recently that my old brain can’t keep up.😁

I haven't tested this.  It's left over from the original script.  My best guess before looking at the code is that it calls the new mover, so would follow the config settings.  (i.e. cache %)

 

I will review this piece of code and see if needs to be updated.  If you must move all files, I would suggest using the User Scripts plug-in and referencing the "mover.old" file.  (I think this was discussed a few weeks back).

7 hours ago, hugenbdd said:

okay, this helps alot!

This looks normal.  The  "Move Now" under the "Mover Settings" in Scheduler, calls the plug-in.  This is a change from 6.8 version.  Your cache pool is never getting above the 65% limit to initiate a move.  So it doesn't move anything.

 

If you want to run the original mover.  I added a button in the bottom right of the "Mover Tuning w/Age - Days old" area.  Bottom right.  This will just call the original mover script that came with unRAID.  

 

image.thumb.png.2cdddeb11061fe6d886d2ce653ac6bde.png

 

 

Hmm, I've never noticed that button there!  I've been using the button on the main array page in Unraid.  I could have sworn that the previous behaviour was that button calling the original script... unless I'm crazy, lol.

Just now, my95z34 said:

 

 

Hmm, I've never noticed that button there!  I've been using the button on the main array page in Unraid.  I could have sworn that the previous behaviour was that button calling the original script... unless I'm crazy, lol.

LOL, you are not going crazy.  You are correct.

 

Now, 6.9, do to share pools, it works different.  The move now invokes the plug-in configs.  That's why I added the new button (latest release) to the bottom right.  So functionality was there again. (Original Mover)

3 hours ago, hugenbdd said:

LOL, you are not going crazy.  You are correct.

 

Now, 6.9, do to share pools, it works different.  The move now invokes the plug-in configs.  That's why I added the new button (latest release) to the bottom right.  So functionality was there again. (Original Mover)

Well, that makes sense.  I'll keep an eye and see if my mover will properly run once it reaches the capacity requirement and I'll post back.  Thanks!

17 hours ago, hugenbdd said:

I haven't tested this.  It's left over from the original script.  My best guess before looking at the code is that it calls the new mover, so would follow the config settings.  (i.e. cache %)

 

I will review this piece of code and see if needs to be updated.  If you must move all files, I would suggest using the User Scripts plug-in and referencing the "mover.old" file.  (I think this was discussed a few weeks back).

Did a little testing last night. Added a few small files to a cache enabled share just to see if they would be moved per the cron schedule set via the force move option. It appears you are correct. These files were not moved because the percentage threshold was not met.

If I set 'Move files off cache based on age?' to yes, and set days to 0, will it simply move whatever the oldest file is, FIFO style?

43 minutes ago, flyize said:

If I set 'Move files off cache based on age?' to yes, and set days to 0, will it simply move whatever the oldest file is, FIFO style?

No.

The age just set's an "mtime" value for the find command.  So it will look for everything greater than 0 days old.

Possible to request that as a feature then? 😁

30 minutes ago, flyize said:

Possible to request that as a feature then? 😁

Problem is I have to know when to stop.  And ordering, checking how much space is left, etc... is a lot more code.  I'm not quite ready to add that feature.

 

I have found with a large enough cache (1TB) that if you set the date at a reasonable amount (15-20 days) for me... it works very similar to FIFO.  

Apparently you see what I'm getting at here. :D

 

Yeah, a min/max with FIFO would be AWESOME. I wrote a PowerShell script for DrivePool that did that back when I was still on Windows. Maybe I'll have to dust off my scripting hat. ;)

On 3/25/2021 at 3:32 PM, hugenbdd said:

Attached is a new "age_mover" which has the echo/log statements in it to help trouble shoot.  Please replace the age_mover with this file if you have trouble.

 

make a backup of the age_mover file

cd /usr/local/emhttp/plugins/ca.mover.tuning/

cp age_mover age_mover_original

 

copy the new file attached to this post to same location

/usr/local/emhttp/plugins/ca.mover.tuning/

age_mover 8.08 kB · 9 downloads

 

I have the same issue I think and when I try to go to /sur/local/emhttp i cannot find the emhttp file in krusader. Any help?

1 hour ago, Feganisto said:

go to /sur/local/emhttp i cannot find the emhttp file in krusader

The normal mappings for Krusader don't give access to the Unraid OS files and that is how it should be. 

Hi can you edit the explanation of the "Only move at this threshold of used cache space" to specify that it work with conjunction of the schedule mover script and it isn't a stand alone check? 

On 3/28/2021 at 8:17 PM, hugenbdd said:

I haven't tested this.  It's left over from the original script.  My best guess before looking at the code is that it calls the new mover, so would follow the config settings.  (i.e. cache %)

 

I will review this piece of code and see if needs to be updated.  If you must move all files, I would suggest using the User Scripts plug-in and referencing the "mover.old" file.  (I think this was discussed a few weeks back).

Any change of getting is functionality back? As it is now the force move option  does not do much and I really prefer to move the files of my cache in the night instead of during the day when it fills up and the array is in use.

Would it be possible to choose which cache pool to look at for the

Only move at this threshold of used cache space

I currently have a cache pool called "cache" which I use to store my appdata and for my downloads I use a cache pool called "scratch" and want the mover to be invoked when the downloads cache gets close to 75% full.

On 3/29/2021 at 11:40 AM, hugenbdd said:

LOL, you are not going crazy.  You are correct.

 

Now, 6.9, do to share pools, it works different.  The move now invokes the plug-in configs.  That's why I added the new button (latest release) to the bottom right.  So functionality was there again. (Original Mover)

Exactly the answer I needed. I thought something was going wrong my setup because each time I pressed it manually nothing would move. But this makes total sense since my threshold is at 70%.

Edited by Sycotix

14 hours ago, bobokun said:

Would it be possible to choose which cache pool to look at for the


Only move at this threshold of used cache space

I currently have a cache pool called "cache" which I use to store my appdata and for my downloads I use a cache pool called "scratch" and want the mover to be invoked when the downloads cache gets close to 75% full.

Yes, this is already built in.  It looks for a custom config item in each pool.  However...... I'm on vacation for the week and I can't remember the exact details while away.  If you look at the code you can find it, or I will post the details early next week.

4 hours ago, hugenbdd said:

Yes, this is already built in.  It looks for a custom config item in each pool.  However...... I'm on vacation for the week and I can't remember the exact details while away.  If you look at the code you can find it, or I will post the details early next week.

Enjoy your vacation! I'm not sure where to look in the code so I'll wait for your response next week on the details. Thank you!

Hi Squid, I just want to say a big THANK YOU for this plugin.  I've been using unraid for over a year and am sad I'm only just now learning about this.  It is one of the most useful plugins I've installed, and makes SSD caches so much more powerful!

Edited by acosmichippo

  • Author
1 hour ago, acosmichippo said:

Hi Squid, I just want to say a big THANK YOU for this plugin.  I've been using unraid for over a year and am sad I'm only just now learning about this.  It is one of the most useful plugins I've installed, and makes SSD caches so much more powerful!

@hugenbdd took over this plugin a while ago.  The thanks on the current iterations go to him.

Just upgraded to stable 6.9.1 and also upgraded mover tuning to 2021.3.17.  Mover didn't automatically move.  I have it set to move at 4:30 am in the morning.  the syslog shows nothing at that time.

 

Apr 7 03:39:05 Skynet emhttpd: read SMART /dev/sdd Apr 7 04:00:01 Skynet Plugin Auto Update: Checking for available plugin updates Apr 7 04:00:08 Skynet Plugin Auto Update: Checking for language updates Apr 7 04:00:08 Skynet Plugin Auto Update: Community Applications Plugin Auto Update finished Apr 7 04:52:37 Skynet emhttpd: read SMART /dev/sdc Apr 7 04:52:39 Skynet emhttpd: read SMART /dev/sdj Apr 7 04:52:55 Skynet emhttpd: read SMART /dev/sdi Apr 7 04:53:09 Skynet emhttpd: read SMART /dev/sde Apr 7 04:54:59 Skynet emhttpd: spinning down /dev/sdd Apr 7 05:09:20 Skynet emhttpd: spinning down /dev/sdi Apr 7 05:10:41 Skynet emhttpd: spinning down /dev/sde Apr 7 05:12:28 Skynet emhttpd: spinning down /dev/sdj

 

should I revert to an older version of mover?  or delete the plug in and reinstall?  

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.