Optimal rclone settings

First we have to edit the rclone file

sudo nano /opt/appdata/plexguide/rclone.env

This is how your config file should look like:

    vfs_ll=ERROR
    vfs_bs=16M
    vfs_rcs=32M
    vfs_rcsl=2048M
    vfs_cm=full
    vfs_cma=48h
    vfs_cms=100G
    vfs_dct=1440m
    vfs_t=8
    vfs_mt=350G
    vfs_c=16

After you need to stop the containers and reboot them:

cat <<EOF >> /home/restart.sh
    container=$(docker ps -aq --format '{{.Names}}' | sed '/^$/d' | grep -E 'ple|arr|emby|jelly')
    docker stop $container >> /dev/null
    IFS=$'\n'
    filter="$1"
    config=/opt/appdata/plexguide/rclone.conf
    mapfile -t mounts < <(eval rclone listremotes --config=${config} | grep "$filter" | sed -e 's/://g' | sed '/GDSA/d' | sort)
    sudo service pgunion stop
    sudo fusermount -uzq /mnt/unionfs
    for i in ${mounts[@]}; do
       sudo service $i stop
       sudo fusermount -uzq /mnt/$i
       sudo service $i start
    done   
    sudo systemctl daemon-reload 
    sudo service pgunion start

    container=$(docker ps -aq --format '{{.Names}}' | sed '/^$/d' | grep -E 'ple|arr|emby|jelly')
    docker start $container >> /dev/null
EOF

Execute now the restart

sudo bash /home/restart.sh

Thanks, @hawks for the settings!

2 Likes

Hello,
i followed this on my plexguide and since then i been getting errors,
apparently there is issues when you change the chunksize and need to purge the cache.
How do you purge the cache ?

Where do i edit the part after rclone.env

should i create a new file named restart.sh in /home/, or what to do

Best regards

Tumlingnet

this command should work. if your username is different just change the root to whatever your username is rm /root/.cache/rclone/vfs/* -r this will delete anything cached on your mounts.

BUT 1ST. stop your mount before doing this.

you edit your rclone.env here sudo nano /opt/appdata/plexguide/rclone.env then you would need to make the restart.sh file with sudo nano /home/restart.sh
add this.

cat <<EOF >> /home/restart.sh
    container=$(docker ps -aq --format '{{.Names}}' | sed '/^$/d' | grep -E 'ple|arr|emby|jelly')
    docker stop $container >> /dev/null
    IFS=$'\n'
    filter="$1"
    config=/opt/appdata/plexguide/rclone.conf
    mapfile -t mounts < <(eval rclone listremotes --config=${config} | grep "$filter" | sed -e 's/://g' | sed '/GDSA/d' | sort)
    sudo service pgunion stop
    sudo fusermount -uzq /mnt/unionfs
    for i in ${mounts[@]}; do
       sudo service $i stop
       sudo fusermount -uzq /mnt/$i
       sudo service $i start
    done   
    sudo systemctl daemon-reload 
    sudo service pgunion start

    container=$(docker ps -aq --format '{{.Names}}' | sed '/^$/d' | grep -E 'ple|arr|emby|jelly')
    docker start $container >> /dev/null
EOF 

after you have done that. save it and run with this
sudo bash /home/restart.sh
done. any problems post here.

Thank you for the reply,
How do I stop the mounts ?
Thank you!

How do we stop mounts?

to stop the mount you would use sudo service tdrive stop