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

I wanted to share a quick script I put together to manage stopping age_mover when I need to take down the array. I found myself defaulting to the stop command as that's what the base unraid mover uses and what I wanted was a way to attempt a soft stop with a timeout without having to monitor it.

#!/bin/bash

TIMEOUT=60  # Set the timeout duration in seconds
END_TIME=$((SECONDS + TIMEOUT))
echo "Starting loop with a ${TIMEOUT} second timeout to wait for mover to stop"

echo "Sending mover sofstop command"
MOVERSTATUS=$(age_mover softstop | grep "running")

while [ $SECONDS -lt $END_TIME ]; do
    MOVERSTATUS=$(age_mover status | grep "running")
    
    if [ "$MOVERSTATUS" = "mover: not running" ]; then
        echo "Mover soft stopped in $SECONDS seconds"
        break
    fi
    
	sleep 1
    echo "Current time: $SECONDS seconds elapsed"
done

if [ $SECONDS -ge $END_TIME ]; then
    echo "Timeout reached after $TIMEOUT seconds"
    echo "Sending mover hard stop command"
    
    age_mover stop
fi

I'm very open to any ideas to improve on this. The script doesn't run frequently and I know doing grep on the text of a command's output is a fragile way to test, but the age_mover commands seem to reliably either say "mover: running" or "mover: not running" so it's working for now.

  • Replies 3.5k
  • Views 485.8k
  • 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

I really dont get all the updates.

It went from a perfectly fine plugin that did everything I need to a broken mess the last couple months.

34 minutes ago, Marcvz said:

to a broken mess the last couple months.

This info not contain any useful information about any issues that you have.

You can use the version you like more, no other users complain for this.

Also you can make prs to help to the plugin to be better :)

Well, the problem I'm having is that my cache disk is filling up.

My previous configuration checked every hour if the cache disk was >xx% full.

If so, it would move all files (that should be moves) to the array.
Every night at 05.00 it would move all the files it can move, regardless of how full the cache disk is.

Before moving, a script is run to stop certain containers to unlock files. After the move, they were started again.

Exactly what I need. But after a waterfall of updates, something stopped working.

That not the first time. Previous time, it was fixed after I've made a post and changes were made to the plugin.
So I was hoping the problem would fix itself in a future update. But nope.. multiple updates later and it's still not working.

And I've been to busy with other stuff to troubleshoot this thing. So now I'm clicking the move button every night before I go to bed.

Edited by Marcvz

8 hours ago, Marcvz said:

And I've been to busy with other stuff to troubleshoot this thing. So now I'm clicking the move button every night before I go to bed.

Did you saw the breaking change message that plugin was separated from the the mover? Howere this should auto adopted but some things changed...

The moving logic was not changed, you can post degug.zip for I can check where the issue...

Not a big deal but since I upgraded I see the following in syslog when it runs.

(Config collapsed below - I have the two logging variables set to "no")

Jan  6 10:00:02 NAS move: ***************************************************** Mover Tuning Plugin version 2025.12.26 ****************************************************
Jan  6 10:00:02 NAS move: ----------------------------------------------------------------- Global settings ---------------------------------------------------------------
Jan  6 10:00:02 NAS move: Using global (cache:yes) moving threshold: 75 %
Jan  6 10:00:02 NAS move: Using global (cache:yes) freeing threshold: 50 %
Jan  6 10:00:02 NAS move: Using global (cache:prefer) fillup threshold: 95 %
Jan  6 10:00:02 NAS move: Primary threshold to Move all Primary->Secondary shares to secondary: 95 %
Jan  6 10:00:02 NAS move: Age: Automatic (smart caching)
Jan  6 10:00:02 NAS move: Clean Folders: yes
Jan  6 10:00:02 NAS move: Skip file list: /boot/extras/mover_tuner/exclude.txt
Jan  6 10:00:02 NAS move: Skip filetypes: DS_Store DSStore nfo unmanic
Jan  6 10:00:02 NAS move: Notify: movedOnly
Jan  6 10:00:23 NAS move: Mover tuning plugin done!

# more /boot/config/plugins/ca.mover.tuning/ca.mover.tuning.cfg

testmode="no"

logging="no"

movenow="yes"

version="2025.12.26"

freeingThreshold="50"

fillupThreshold="95"

omovercfg="yes"

age="yes"

cleanFolders="yes"

cleanDatasets="no"

ctime="no"

atime="no"

enableTurbo="no"

filelistf="yes"

filetypesf="yes"

ignoreHidden="no"

rebalanceShares="no"

sizef="no"

sparsnessf="no"

synchronizeCache="no"

resynchronizeCache="no"

notify="movedOnly"

debuglogging="no"

loggingFolder="/tmp"

logfilesDaysold="7"

listfilesDaysold="7"

validateFilenames="no"

moverDisabled="no"

advancedSettings="yes"

parity="yes"

moverNice="5"

moverIO="-c 2 -n 7"

force="no"

beforeScript=""

afterScript=""

movingThreshold="75"

advancedFilters="yes"

advancedOptions="no"

daysold="-1"

filelistv="/boot/extras/mover_tuner/exclude.txt"

filetypesv=".DS_Store,._.DS_Store,.nfo,.unmanic"

omoverthresh="95"

movefilesTool="move"

sizefSync="no"

invalidFileChars="$ / < > : \" | ? *"

moveEmptyFolders="yes"

moverTuneCron="0 */1 * * *"

When I enabled debug logging, to track it down, I got this error:

Jan  6 09:00:23 NAS move: ************************************************************ ANALYSING MOVING ACTIONS ***********************************************************
Jan  6 09:00:23 NAS move: Deciding the action (move/sync/keep) for each file. There are 4 files, it can take a while...
Jan  6 09:00:23 NAS move: awk: cmd. line:197:             printf "PRIMARYSTORAGENAME|FILES_FROM_PRIMARY|SIZE_FROM_PRIMARY|FOLDERS_FROM_PRIMARY|FILES_FROM_SECONDARY|SIZE_FROM_SECONDARY|FOLDERS_FROM_SECONDARY|FILES_FROM_UNATTENDED|SIZE_FROM_UNATTENDED|FOLDERS_FROM_UNATTENDED\n" > "
Jan  6 09:00:23 NAS move: awk: cmd. line:197:                                                                                                                                                                                                                                          ^ unterminated string
Jan  6 09:00:23 NAS move: grep:
Jan  6 09:00:23 NAS move: /tmp/ca.mover.tuning/Summary_2026-01-06T090001.txt: No such file or directory
51 minutes ago, CS01-HS said:

upgraded I see the following in syslog when it runs.

From what version?

Do you mean not all config values available in echo?

54 minutes ago, CS01-HS said:
Jan  6 09:00:23 NAS move: awk: cmd. line:197                             ^ unterminated string

I will try to check it

56 minutes ago, CS01-HS said:

Not a big deal but since I upgraded

Can you open issue for it?

10 minutes ago, Masterwishx said:

From what version?

Do you mean not all config values available in echo?

With the version as of a couple weeks ago I didn't notice a multi-line printout every hour when mover ran. I don't know if the printout's intentional or a bug.

11 minutes ago, Masterwishx said:

Can you open issue for it?

Sure. For the syslog printout, the debug error, or both?

Maybe a silly question but where would I do that?

I just ran mover with mover-tuning for the first time in a while, and I noticed it resulted in empty folders being left on my cache drive. It seems to be top level TV show folders created by Sonarr. I didn't have any movies moved, so I don't know if Radarr folders would act the same. I did some digging in the logs and found this as an example:

image.png

It deleted the Season 01 folder, and correctly did not delete the media folder, but it didn't delete the top level show folder (.../tv/Smiling Friends/) like I would have expected. In unraid, the folder is empty.

image.png

Am I missing something here? My clean empty folders setting is set to Top Folder, as shown:

image.png

Thank you

On 1/6/2026 at 6:33 PM, CS01-HS said:

Maybe a silly question but where would I do that?

If you think both a bugs, you can open issue in my github link in help section of plugin

On 1/6/2026 at 6:42 PM, the_capn said:

Am I missing something here?

https://github.com/masterwishx/ca.mover.tuning/issues/126

On 1/6/2026 at 6:42 PM, the_capn said:

Am I missing something here?

It should be moved as empty folder on next run

I uninstalled it, the plugin is broken says it moved 5TB but instead it did only 900GB, logs show nothing useful.

I keep seeing errors about unresolved hardlinks, unsure how to fix these, does anybody have any advice.

26 minutes ago, JackTovey said:

does anybody have any advice.

What moving tool you are using (move or rsync)?, try to switch it.

What the logs show exactly? You can search this thread for hard links info

Edited by Masterwishx

1 hour ago, Masterwishx said:

What moving tool you are using (move or rsync)?, try to switch it.

What the logs show exactly? You can search this thread for hard links info

You're a scholar and a gent/lady, switched to Rsync and it appears to be working.

I'm sorry to be bothering, but the age filter doesnt seem to be working.

I noticed the mover not moving anything and ive played around with dozen different dry runs and figured out that any "Move files that are greater than this many days old:" set to anything else than Auto, will not move any files.

Ive checked with stat and find to see that unraid actually sees the files as older than 1 day. I have CTIME and ATIME off and everything else advanced off.

If i disable the age filter or set it to auto it works, but doesnt with anything else.

Just updated to newest version of plugin and unraid and the ui is finally better, but the age filter still doesnt work

Any ideas?

1 hour ago, VivianV said:

Any ideas?

Need more info, config file or debug.zip, what moving thresholds etc...

55 minutes ago, Masterwishx said:

Need more info, config file or debug.zip, what moving thresholds etc...

Sorry for giving incomplete info.

I ran a move manually with auto age settings after this post cause I was at 93%

But heres the failed runs from before. Run without age limit, moved files neatly and in order. I can post that too if its any help.

I checked that even the mover action log sees that the apothecary diaries are 6 months old, but doesnt move them, even though the config seen in mover_tuning.log tells it to...

data share from download to user0 is the one im trying to move(r)

Mover_action_2026-01-15T144452.list.txt Mover_tuning_2026-01-15T144452.log.txt

hi.

not sure what settings i'm doing wrong but the plug leaves empty folder no matter how many times i manually move it.. i have set up clean empty folder to top folder and move folder to yes.

But if i use the default mover button, it cleans everything right up.

Edited by i1mran92

  • 1 month later...
On 1/21/2026 at 3:56 PM, i1mran92 said:

hi. here is my mover debug zip file.

i just tried to manually move before download the zip file and it still left only empty "data" folder

ca.mover.tuning-debug-20260121-2151.zip

It was fixed in last version if you use move tool instead rsync.

When rsync using it clean moved empty folder by one every time plugin runs if nested empty folder.

But seems still share top folder still exist in this case wiil be fixed in next version.

So I upgraded to 7.2.4 from 7.2.0. I had mover tuning working perfectly on 7.2.0. When I upgraded it said it doing things differently. Trying on my test server before going any further. Didn't change anything from the 7.2.0. When mover hit it transferred everything of my primary to my secondary.

Anyone running it with 7.2.1 and above?

From the looks at the settings looks like it runs off of a cron schedule? So like ever Tuesday at 3 am should it be ,0 3 * * 2?

if anyone can explain the new

can someone please explain the new settings for me. I assume i disable the built in unraid mover and then put in the new Mover Tuning schedule in cron format ?

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.