Browse Source

Update mergerfs.percent-full-mover

Correct variables. They should be CACHEFS not CACHE
pull/1495/head
adolfotregosa 3 months ago
committed by GitHub
parent
commit
3a6fb59b74
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      tools/mergerfs.percent-full-mover

6
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
Loading…
Cancel
Save