Linux Episodes on mhddfs source not being added reliably during library update
#31
Thanks @Wintersdark

Turns out I was chasing a red herring as to why my show was not getting added correctly.

My FSTab for the record:

Code:
/mnt/d/*        /drobo  fuse.mergerfs   defaults,allow_other,minfreespace=4G,moveonenospc=true,func.getattr=newest      0       0

I may remove moveonenospc=true - but I like putting some default values in the fstab to ensure that I know in the future how to change them Smile
Reply
#32
(2016-03-03, 05:43)yuuzhan Wrote: @trapexit (or anyone who knows) is there a policy for Actions (specifically mv / rename) that chooses "Same Drive if enough space, falls back to [SOMETHING ELSE]". Or is that such a basic function that I am missing that it would be anything else Tongue

Thanks!

How rename works is described in the docs.

https://github.com/trapexit/mergerfs#rename--link

It's not "mv / (or) rename". mv uses rename and rename is a very specific behavior with very defined limits. It is very nontrivial to replicate and the policy of create affects it.
Reply
#33
Hey Guys,

I wasn't keen to move away from mhddfs simply because other than this one issue, it works and I don't have time to mess with my box. I was also not keen to slow my library scans by disabling hashing so I figured why not come up with a bash script & cron job combo that would update my directory last modified date automatically based on the most recent file inside that directory (recursively to 3 levels)? Here's the bash script that I am using.


Code:
#!/bin/bash
if [ -z "$1" ] ; then
  echo 'ERROR: Parameter missing. specify the directory!'
  exit
fi
MODE=tail # Use the newest file in the directory
#MODE=head # Use the oldest file in the directory
for d in "$1"/*/; do
  echo "running on $d"
  find "$d" -type d -execdir \
    touch --reference="$(find "$d" -mindepth 1 -maxdepth 3 -printf '%T+=%p\n' \
                              | sort | "$MODE" -n 1 | cut -d= -f2-)" "$d" \;
done

I have mhddfs configured to pool my drives under /mnt/data and I have a Series folder inside there.
I run the script with my /mnt/data/Series folder as a parameter, so in my instance it's run as:

Code:
./UpdateSeriesFolderTime.sh /mnt/data/Series

Works perfectly, so I've now setup a cron job to run it every 2 hours.
Reply

Logout Mark Read Team Forum Stats Members Help
Episodes on mhddfs source not being added reliably during library update0