Jump to content

ZGief

Members
  • Posts

    11
  • Joined

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ZGief's Achievements

Noob

Noob (1/14)

1

Reputation

  1. Reading through my latest mover tuner logs (doesn't happen too often because it only triggers when cache is 70% full) I noticed a few errors I wanted to report in case they are bugs. First one: Sep 1 03:49:58 Tower root: /usr/local/emhttp/plugins/ca.mover.tuning/age_mover: line 1050: [: : integer expression expected Around line 1050 the code is if [ "$NBLINKS" -gt 1 ] && [ "$FILESIZE" = 0 ] ; then continue fi The second one was: Sep 1 03:49:58 Tower root: /usr/local/emhttp/plugins/ca.mover.tuning/age_mover: line 1231: 0: command not found #Run mover after script if specified. if [ ! -z "$AFTERSCRIPT" ] && [ ! -e $SOFTSTOPFILE ]; then if [ -f "$AFTERSCRIPT" ] && [ -x "$AFTERSCRIPT" ]; then mvlogger "Launching after script: $AFTERSCRIPT" eval \"$AFTERSCRIPT\" mvlogger "After script finished with result: $( $? && "OK" || $?)" <---- This is line 1231 else mvlogger "After script file $AFTERSCRIPT does not exist or is not executable." mvlogger "Skipping" fi fi I do run before and after scripts which seems to be running just fine. So I'm not sure what this is trying to tell me.
  2. Interesting! Learned something new today. Thanks!
  3. It looks like the scripts stored by User Scripts aren't ready to be run outside of the plugin. The files aren't executable (see permissions col) and the script itself doesn't have that first line that "bash" line to instruct the os how to run it. What I did was put my before and after run scripts in: /mnt/ssd_cache_docker/appdata/qbittorrent/qBittorrent/scripts/pause-qbit.sh /mnt/ssd_cache_docker/appdata/qbittorrent/qBittorrent/scripts/resume-qbit.sh I made sure these two files were executable (chmod command) and that the file had #!/bin/bash on the first line. If you're hoping to only have one copy of the script that can be run by mover tuner and in the user scripts UI, i'm not sure if that is possible.
  4. Question about the combination of hardlinks and moving files from cache to array. Following trashguides i have two folders each contains the same file with different names, but they are hardlinked. I want to keep newer files in cache and move the older ones to the array, but I want the hardlinked files to move at the same time to the array and be hardlinked when they are on the array (don't want dupes that take up 2x space). What is the best config to achieve this? My thinking is: - Move about 70% full - no needs to move anything until cache is getting full - When move does run, either: only move files > 7days old.... or... move files until cache is 30% full (not sure which one) The two things I want to achieve are: Hardlinks are always maintained on both the cache & array - don't want dupes, don't want one file on cache and the other on array (not sure how this is possible, maybe with % settings) Newer files stay on cache as long as possible Any thoughts/guidance would be appreciated!
  5. Sweet. How do you know this is maintained? I don't see it in the community apps. Mover tuner question. Does the setting "Script to run before mover (No checks, always runs):" wait for the script provided to complete before running mover?
  6. Ok, pretty sure I solve my issue. TLDR - I only have 3 shares: data, appdata, system. Deleting the cfg files that don't exist fixed it. However, as you can see above there were three .cfg files in the /boot/config/shares folder that don't match up. tmp.cfg - i created a 'tmp' share thinking i needed it, but then deleted it in the UI a few days ago isos - i think unraid created this automatially to support VMs but i don't use VMs so i deleted this folder form the UI too domains - no idea where this came from, maybe it was there on initial install of unraid a few weeks ago, probably deleted it in the UI too Anyway, even those these shares no longer exist in the UI, these .cfg files are hanging around. And mover tuner uses them to do its work. You can see that here in the /usr/local/emhttp/plugins/ca.mover.tuning/age_mover file: It is looping through all cfg files in that folder trying to get useful info out of them to set variables and such but the files are empty and worthless causing it to hang when it gets to the part of the script that requires those variables. Possible solution: write a few more checks to make sure the cfg file is not one of these orphaned share configs and skip them if they are.
  7. I think i understand your question. My interpretation: Looking at lines 412 for SHARECFG in /boot/config/shares/*.cfg; do 465 POOLSIZE=$(df --output=size --block-size=1 /mnt/$PRIMARYSTORAGENAME | tail -n 1) 438 PRIMARYSTORAGENAME=$(grep "shareCachePool=" "$SHARECFG" | cut -d'=' -f 2 | tr -d '"' | tr -d '\r') PRIMARYSTORAGENAME gets its value from SHARECFG (in a loop) looking through the config files in /boot/config/shares my configs in that dir The "data.cfg" is the one I care about. It is the cache SSD that holds the 'data' directory. This folder is present in the cache. However, you said "check if the 'domains' folder is in the cache". I don't know anything about a domains folder. That isn't a share i setup and isn't in my shares list in the UI. The doamains cfg is here if that helps. I don't run vms. Not sure how the domains file got here to be honest.
  8. @Reynald I'm a programming novice, but looking at this block of code around the error, wouldn't the POOLSIZE variable be created in a context (the if / else) that isn't available below?
  9. Really appreciate your help btw! I have been trying different setting and still getting that error. From your advice above I tried changing age to 'yes', forgot i had test on yes, changed that. Added all the logs below in case that is helpful. Happy to re-run with any settings for experimentation. Just let me know. Also, I have to run: `mover stop` to get it to stop hanging after that error. Aug 8 10:50:33 Tower emhttpd: shcmd (5659): /usr/local/sbin/mover |& logger -t move & Aug 8 10:50:33 Tower root: Starting Mover Aug 8 10:50:33 Tower root: ionice -c 2 -n 0 nice -n 0 /usr/local/emhttp/plugins/ca.mover.tuning/age_mover start Aug 8 10:50:33 Tower move: *************************************************** Mover Tuning Plugin version 2024.08.07.0858 ************************************************* Aug 8 10:50:33 Tower move: Log Level: 1 Aug 8 10:50:33 Tower move: ----------------------------------------------------------------- Global settings --------------------------------------------------------------- Aug 8 10:50:33 Tower move: Using global moving threshold: 70 % Aug 8 10:50:33 Tower move: Using global freeing threshold: 20 % Aug 8 10:50:33 Tower move: Age: 10 Aug 8 10:50:33 Tower move: After script: /mnt/ssd_cache_docker/appdata/qbittorrent/qBittorrent/scripts/resume-qbit.sh Aug 8 10:50:33 Tower move: Before script: /mnt/ssd_cache_docker/appdata/qbittorrent/qBittorrent/scripts/pause-qbit.sh Aug 8 10:50:33 Tower move: Launching before script: /mnt/ssd_cache_docker/appdata/qbittorrent/qBittorrent/scripts/pause-qbit.sh Aug 8 10:50:33 Tower move: Qbit pause starting to pause cache torrents and run mover Aug 8 10:50:33 Tower move: Qbit pause completed pausing torrents Aug 8 10:50:33 Tower move: Before script finished Aug 8 10:50:33 Tower move: ***************************************************************** FILTERING FILES *************************************************************** Aug 8 10:50:33 Tower move: Info: you may optionally install 'bc' from 'NerdTools' to have more precise size value Aug 8 10:50:33 Tower move: ------------------------------------------------------------ Processing appdata share ----------------------------------------------------------- Aug 8 10:50:33 Tower move: Primary storage: ssd_cache_docker - used: 2 % (4 GiB) Aug 8 10:50:33 Tower move: Secondary storage: none Aug 8 10:50:33 Tower move: Share Information: Name: appdata - Path: /mnt/ssd_cache_docker/appdata Aug 8 10:50:33 Tower move: Mover action: no action, only ssd_cache_docker used (cache:only). Aug 8 10:50:33 Tower move: => Nothing will be moved. Share usage is taken into account in the calculation of the threshold for other shares. Aug 8 10:50:33 Tower move: Calculating share usage... (can take a moment) Aug 8 10:50:33 Tower move: ssd_cache_docker/appdata used: 447 MiB Aug 8 10:50:33 Tower move: -------------------------------------------------------------- Processing data share ------------------------------------------------------------ Aug 8 10:50:33 Tower move: Primary storage: ssd_cache_array - used: 42 % (97 GiB) Aug 8 10:50:33 Tower move: Secondary storage: user0 Aug 8 10:50:33 Tower move: Share Information: Name: data - Path: /mnt/ssd_cache_array/data Aug 8 10:50:33 Tower move: Moving threshold: 70% (163 GiB) ; Freeing threshold: 20% (46 GiB) Aug 8 10:50:33 Tower move: Mover action: ssd_cache_array->user0 (cache:yes). Pool is below moving threshold percentage: 42% < 70%. Aug 8 10:50:33 Tower move: => Skipping Aug 8 10:50:33 Tower move: ------------------------------------------------------------ Processing domains share ----------------------------------------------------------- Aug 8 10:50:33 Tower move: df: /mnt/cache: No such file or directory Aug 8 10:50:33 Tower move: df: /mnt/cache: No such file or directory Aug 8 10:50:33 Tower move: df: /mnt/cache: No such file or directory Aug 8 10:50:33 Tower move: /usr/local/emhttp/plugins/ca.mover.tuning/age_mover: line 467: * 20 / 100: syntax error: operand expected (error token is "* 20 / 100")
  10. I'm assuming you're talking about this setting on the shares "Override Mover Tuning settings for this share:" I have 3 shares. Two are caches and don't have this setting. The other is set to 'no' as shown above.
  11. Hey all, Recently I noticed my mover job getting stuck. Looking at the logs i see the following: Aug 8 08:46:33 Tower move: /usr/local/emhttp/plugins/ca.mover.tuning/age_mover: line 467: * 0 / 100: syntax error: operand expected (error token is "* 0 / 100") I don't think I have any crazy settings. Looking at that line of code it seems like maybe $POOLSIZE isn't being set maybe? Any advice / guidance would be appreciated!
×
×
  • Create New...