I dropped acd_cli completely as with my library getting close to 30TB the acd_cli syncing was failing often and since I have mounts from 2 locations ( download/upload server & plex server ) it caused even more problems. The acd_cli cache (node.db was over 200MB and it was pain resyncing as in most cases it needed 2, 3 times before it was actually synced )
Now back on topic I decided to mount my amazon drive with rclone:
rclone mount --allow-non-empty --allow-other --max-read-ahead 200M acd:/ /storage/.acd/ &
With cron ( every minute ) iam running script that checks if drive is mounted and remount if its not.
` #!/bin/bash
if pidof -o %PPID -x "acd-check.sh"; then
echo "$(date "+%d.%m.%Y %T") SKIP: acd-check.sh already running." | tee -a "/var/log/acd-cron.log"
exit 1
fi
if [[ -f "/storage/.acd/encrypted/acd-check" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Check successful,drive mounted" | tee -a "/var/log/acd-check.log"
else
echo "$(date "+%d.%m.%Y %T") ERROR: Drive not mounted remount in progress" | tee -a "/var/log/acd-check.log"
fusermount -uz /storage/.acd
rclone mount --allow-non-empty --allow-other acd:/ /storage/.acd/ | tee -a "/var/log/acd-check.log"
if [[ -f "/storage/.acd/encrypted/acd-check" ]]; then
echo "$(date "+%d.%m.%Y %T") INFO: Remount successful" | tee -a "/var/log/acd-check.log"
else
echo "$(date "+%d.%m.%Y %T") CRITICAL: Remount failed." | tee -a "/var/log/acd-check.log"
fi
fi
exit
`
I usually have 10 to 15 concurrent streams on my Plex ( family and friends ) and with acdcli it worked flawlessly until one of the sync's broke db and ....
I was checking the docs rclone mount and have few questions for those who tested streaming
--max-read-ahead 200M ( this is something I set as i read it here on the forums )
what else could be added to speed up stream as much as possible like
--no-modtime
--write-back-cache
etc...
p.s. Also forgot to mention all content in my ACD drive is encfs encrypted so all mounts
rclone mount --allow-non-empty --allow-other acd:/ /storage/.acd/
ENCFS6_CONFIG='/home/plex/data/encfs.xml' encfs -o allow_other /storage/.acd/encrypted /storage/acd/ --extpass="cat /home/plex/data/.encfs" --public
ENCFS6_CONFIG='/home/plex/data/encfs.xml' encfs -o allow_other /storage/.media-local /storage/media-local/ --extpass="cat /home/plex/data/.encfs" --public
unionfs-fuse -o cow, -o allow_other /storage/media-local=RW:/storage/acd=RO /storage/media-unionfs
And everything is being uploaded with
/usr/bin/rclone move /storage/.media-local/ acd:/encrypted -c --transfers=500 --checkers=500 --delete-after --min-age 15m --log-file=/var/log/rclone-cron.log