From 3a6fb59b74e22f030f26c2e021f74a7d5a232beb Mon Sep 17 00:00:00 2001 From: adolfotregosa Date: Wed, 9 Jul 2025 20:11:48 +0100 Subject: [PATCH 1/2] Update mergerfs.percent-full-mover Correct variables. They should be CACHEFS not CACHE --- tools/mergerfs.percent-full-mover | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/mergerfs.percent-full-mover b/tools/mergerfs.percent-full-mover index 27b8dd11..f73140b7 100755 --- a/tools/mergerfs.percent-full-mover +++ b/tools/mergerfs.percent-full-mover @@ -10,10 +10,10 @@ BASEPOOL="${2}" PERCENTAGE=${3} set -o errexit -while [ $(df "${CACHE}" | tail -n1 | awk '{print $5}' | cut -d'%' -f1) -gt ${PERCENTAGE} ] +while [ $(df "${CACHEFS}" | tail -n1 | awk '{print $5}' | cut -d'%' -f1) -gt ${PERCENTAGE} ] do # Find the file with the oldest access time - FILE=$(find "${CACHE}" -type f -printf '%A@ %P\n' | \ + FILE=$(find "${CACHEFS}" -type f -printf '%A@ %P\n' | \ sort | \ head -n 1 | \ cut -d' ' -f2-) @@ -32,6 +32,6 @@ do --remove-source-files \ --relative \ --log-file=/tmp/mergerfs-cache-rsync.log \ - "${CACHE}/./${FILE}" \ + "${CACHEFS}/./${FILE}" \ "${BACKING}/" done From 076568736f3632670b780d0496301748603c1add Mon Sep 17 00:00:00 2001 From: adolfotregosa Date: Thu, 10 Jul 2025 12:27:42 +0100 Subject: [PATCH 2/2] Update mergerfs.percent-full-mover Also fix variable ${BACKING}. Has to be ${BASEPOOL}. --- tools/mergerfs.percent-full-mover | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mergerfs.percent-full-mover b/tools/mergerfs.percent-full-mover index f73140b7..af6e8209 100755 --- a/tools/mergerfs.percent-full-mover +++ b/tools/mergerfs.percent-full-mover @@ -33,5 +33,5 @@ do --relative \ --log-file=/tmp/mergerfs-cache-rsync.log \ "${CACHEFS}/./${FILE}" \ - "${BACKING}/" + "${BASEPOOL}/" done