What is the problem you are having with rclone?
Rclone mount will not allow me to move files with the mount.
I run this script as root which is default behavior since its a script that is ran automatically at boot by the system.
- I have verified that the user account can read the files but cannot move them. If i try to move the file from the synology webgui the following message displays: "Error occurred on "FILE" (This action is not supported)".
- I did notice that the folders for the cache files is owned by root. Not sure if that's an issue.
Script:
################################################################################
############## Rclone mounting script at boot for Synology systems. ############
################################################################################
# ___ ___ ___ #
# / /\ /__/\ / /\ #
# / /::\ | |::\ / /:/_ #
# / /:/\:\ | |:|:\ / /:/ /\ #
# / /:/ \:\ __|__|:|\:\ / /:/_/::\ #
# /__/:/ \__\:\ /__/::::| \:\ /__/:/__\/\:\ #
# \ \:\ / /:/ \ \:\~~\__\/ \ \:\ /~~/:/ #
# \ \:\ /:/ \ \:\ \ \:\ /:/ #
# \ \:\/:/ \ \:\ \ \:\/:/ #
# \ \::/ \ \:\ \ \::/ #
# \__\/ \__\/ \__\/ #
# #
################################################################################
#### rclone credit : https://github.com/ncw/rclone
### Install rclone : https://rclone.org/install/
# Easier to edit your config file in your home folder. below is a command
# to copy the file to where it needs to be.
# sudo cp /volume1/homes/omg/rclone_mount_scripts/* /usr/local/etc/rc.d/
set -x
source "${BASH_SOURCE%/*}/rclone_args"
PROG_LOG=$PROG_PATH/logs/rclone_plex_mount.log
RCLONE_MNT=$PROG_PATH/cloud
REMOTE=gdsa-tdplex_union:
# Calculate best chunksize for transfer speed.
AvailableRam=$(free --giga -w | grep Mem | awk '{print $8}')
case "$AvailableRam" in
[1-9][0-9] | [1-9][0-9][0-9]) driveChunkSize="1G" ;;
[6-9]) driveChunkSize="512M" ;;
5) driveChunkSize="256M" ;;
4) driveChunkSize="128M" ;;
3) driveChunkSize="64M" ;;
2) driveChunkSize="32M" ;;
[0-1]) driveChunkSize="8M" ;;
esac
# Rclone ENV - dont change
export RCLONE_DRIVE_CHUNK_SIZE="$driveChunkSize"
_MountPoint() { # Create mount location if necessary.
if [ ! -d "$RCLONE_MNT" ]; then
echo "Creating Mount Location"
mkdir -p "$RCLONE_MNT"
fi
}
_unmount() { # Unmount a mounted remote.
fusermount -uz "$RCLONE_MNT"
}
_Mount() {
until "$PROG" mount "$REMOTE" "$RCLONE_MNT" "$@"; do
_MountPoint
_unmount
echo ""
echo ""
echo "rclone mount for $RCLONE_MNT crashed with exit code $?. Respawning.."
echo ""
echo ""
sleep 2
done
}
if [ -z "$1" ]; then
case $(echo "$0" | /bin/sed 's/^.*\/\(.*\)/\1/g') in
S??*) rc="start" ;;
K??*) rc="stop" ;;
*) rc="usage" ;;
esac
else
rc="$1"
fi
case "$rc" in
start)
echo "starting service $PROG"
touch $PROG_LOG
_Mount "${RCLONE_ARGS[@]}" "--log-file=$PROG_LOG" 2>&1
;;
stop)
_unmount
;;
restart)
"$0" stop
sleep 1
"$0" start
;;
*)
echo "Usage: $0 (start|stop|restart|usage)"
;;
esac
rclone_args file:
PROG_PATH="/volume1/homes/omg"
PROG_CFG="$PROG_PATH/.config/rclone/rclone.conf"
PROG=$PROG_PATH/bin/rclone
RCLONE_ARGS=(
"--allow-other"
"--attr-timeout=1000h"
"--buffer-size=16M"
"--cache-dir=$PROG_PATH/.cache/rclone"
"--config=$PROG_CFG"
"--daemon"
"--dir-cache-time=1000h"
"--drive-acknowledge-abuse=true"
"--gid=100"
"--log-level=DEBUG"
"--timeout=1h"
"--uid=1026"
"--umask=002"
"--vfs-cache-max-age=336h"
"--vfs-cache-max-size=100G"
"--vfs-cache-mode=full"
"--vfs-read-chunk-size-limit=32M"
"--vfs-read-chunk-size=32M"
"--write-back-cache"
)
What is your rclone version (output from rclone version
)
rclone v1.53.1
- os/arch: linux/amd64
- go version: go1.15
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux NAS01 4.4.59+ #25426 SMP PREEMPT Wed Jul 8 03:18:11 CST 2020 x86_64 GNU/Linux synology_denverton_rs2418+
Which cloud storage system are you using? (eg Google Drive)
Google drive x5 in a a union backend
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
/volume1/homes/omg/bin/rclone mount gdsa-tdplex_union: /volume1/homes/omg/cloud --attr-timeout=1000h --buffer-size=16M --cache-dir=/volume1/homes/omg/.cache/rclone --config=/volume1/homes/omg/.config/rclone/rclone.conf --daemon --dir-cache-time=1000h --log-level=DEBUG --timeout=1h --umask=002 --vfs-cache-max-age=336h --vfs-cache-max-size=100G --vfs-cache-mode=full --vfs-read-chunk-size-limit=32M --vfs-read-chunk-size=32M --write-back-cache --uid=1026 --gid=100 --log-file=/volume1/homes/omg/logs/rclone_plex_mount.log
The rclone config contents with secrets removed.
[gdsa-tdplex_union]
type = union
upstreams = gdsa-tdtv: gdsa-tdtv2: gdsa-tdmovies: gdsa-tdtv3:
action_policy = eplno
create_policy = eplno
search_policy = ff
[gdsa-tdmovies]
type = drive
config_automatic = yes
scope = drive
service_account_file = /volume1/homes/omg/.config/rclone/prince-charles@gdsa.iam.gserviceaccount.com.json
team_drive = 0ABE
[gdsa-tdtv]
type = drive
config_automatic = yes
scope = drive
service_account_file = /volume1/homes/omg/.config/rclone/prince-charles@gdsa.iam.gserviceaccount.com.json
team_drive = 0AEF
[gdsa-tdtv2]
type = drive
config_automatic = yes
scope = drive
service_account_file = /volume1/homes/omg/.config/rclone/prince-charles@gdsa.iam.gserviceaccount.com.json
team_drive = 0AOh
[gdsa-tdtv3]
type = drive
config_automatic = yes
scope = drive
service_account_file = /volume1/homes/omg/.config/rclone/prince-charles@gdsa.iam.gserviceaccount.com.json
team_drive = 0AAi
A log from the command with the -vv
flag
2020/09/17 02:06:00 DEBUG : rclone: Version "v1.53.1" starting with parameters ["/volume1/homes/omg/bin/rclone" "mount" "gdsa-tdplex_union:" "/volume1/homes/omg/cloud" "--attr-timeout=1000h" "--buffer-size=16M" "--cache-dir=/volume1/homes/omg/.cache/rclone" "--config=/volume1/homes/omg/.config/rclone/rclone.conf" "--daemon" "--dir-cache-time=1000h" "--log-level=DEBUG" "--timeout=1h" "--umask=002" "--vfs-cache-max-age=336h" "--vfs-cache-max-size=100G" "--vfs-cache-mode=full" "--vfs-read-chunk-size-limit=32M" "--vfs-read-chunk-size=32M" "--write-back-cache" "--uid=1026" "--gid=100" "--log-file=/volume1/homes/omg/logs/rclone_plex_mount.log"]
2020/09/17 02:06:00 DEBUG : Creating backend with remote "gdsa-tdplex_union:"
2020/09/17 02:06:00 DEBUG : Using config file from "/volume1/homes/omg/.config/rclone/rclone.conf"
2020/09/17 02:06:00 DEBUG : Creating backend with remote "gdsa-tdtv3:"
2020/09/17 02:06:00 DEBUG : Creating backend with remote "gdsa-tdtv2:"
2020/09/17 02:06:00 DEBUG : Creating backend with remote "gdsa-tdmovies:"
2020/09/17 02:06:00 DEBUG : Creating backend with remote "gdsa-tdtv:"
2020/09/17 02:06:00 DEBUG : vfs cache: root is "/volume1/homes/omg/.cache/rclone/vfs/gdsa-tdplex_union"
2020/09/17 02:06:00 DEBUG : vfs cache: metadata root is "/volume1/homes/omg/.cache/rclone/vfs/gdsa-tdplex_union"
2020/09/17 02:06:00 DEBUG : Creating backend with remote "/volume1/homes/omg/.cache/rclone/vfs/gdsa-tdplex_union"
2020/09/17 02:06:00 DEBUG : union root '': Mounting on "/volume1/homes/omg/cloud"
2020/09/17 02:06:00 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2020/09/17 02:06:00 DEBUG : : Root:
2020/09/17 02:06:00 DEBUG : : >Root: node=/, err=<nil>
2020/09/17 02:06:11 DEBUG : /: Lookup: name="TV Shows III"
2020/09/17 02:06:12 DEBUG : /: >Lookup: node=TV Shows III/, err=<nil>
2020/09/17 02:06:12 DEBUG : TV Shows III/: Attr:
2020/09/17 02:06:12 DEBUG : TV Shows III/: >Attr: attr=valid=1000h0m0s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/09/17 02:06:12 DEBUG : TV Shows III/: Lookup: name="_incoming"
2020/09/17 02:06:12 DEBUG : TV Shows III/: >Lookup: node=TV Shows III/_incoming/, err=<nil>
2020/09/17 02:06:12 DEBUG : TV Shows III/_incoming/: Attr:
2020/09/17 02:06:12 DEBUG : TV Shows III/_incoming/: >Attr: attr=valid=1000h0m0s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/09/17 02:06:12 DEBUG : TV Shows III/_incoming/: Lookup: name="TV"
2020/09/17 02:06:13 DEBUG : TV Shows III/_incoming/: >Lookup: node=TV Shows III/_incoming/TV/, err=<nil>
2020/09/17 02:06:13 DEBUG : TV Shows III/_incoming/TV/: Attr:
2020/09/17 02:06:13 DEBUG : TV Shows III/_incoming/TV/: >Attr: attr=valid=1000h0m0s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/09/17 02:06:13 DEBUG : TV Shows III/_incoming/TV/: Lookup: name="Archer.S03E00.Heart.of.Archness.(1).BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR.mkv"
2020/09/17 02:06:20 DEBUG : TV Shows III/_incoming/TV/: >Lookup: node=<nil>, err=no such file or directory
2020/09/17 02:06:20 DEBUG : /: Attr:
2020/09/17 02:06:20 DEBUG : /: >Attr: attr=valid=1000h0m0s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2020/09/17 02:06:20 DEBUG : TV Shows III/_incoming/: Lookup: name="Archer.S03E00.Heart.of.Archness.(1).BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR.mkv"
2020/09/17 02:06:20 DEBUG : TV Shows III/_incoming/: >Lookup: node=TV Shows III/_incoming/Archer.S03E00.Heart.of.Archness.(1).BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR.mkv, err=<nil>
2020/09/17 02:06:20 DEBUG : TV Shows III/_incoming/Archer.S03E00.Heart.of.Archness.(1).BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR.mkv: Attr:
2020/09/17 02:06:20 DEBUG : TV Shows III/_incoming/Archer.S03E00.Heart.of.Archness.(1).BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR.mkv: >Attr: a=valid=1000h0m0s ino=0 size=5175667032 mode=-rw-rw-r--, err=<nil>
2020/09/17 02:06:20 DEBUG : TV Shows III/_incoming/TV/: Lookup: name="Archer.S03E00.Heart.of.Archness.(1).BluRay.1080p.AVC.DTS-HD.MA.5.1.REMUX-FraMeSToR.mkv"
2020/09/17 02:06:20 DEBUG : TV Shows III/_incoming/TV/: >Lookup: node=<nil>, err=no such file or directory
2020/09/17 02:06:20 DEBUG : : Statfs:
2020/09/17 02:06:20 DEBUG : Google drive root '': read info from team drive "OMG|Media TV"
2020/09/17 02:06:21 DEBUG : Google drive root '': read info from team drive "OMG|Media TV II"
2020/09/17 02:06:21 DEBUG : Google drive root '': read info from team drive "OMG|Media Movies"
2020/09/17 02:06:21 DEBUG : Google drive root '': read info from team drive "OMG|Media TV III"
2020/09/17 02:06:21 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2020/09/17 02:06:21 DEBUG : : Statfs:
2020/09/17 02:06:21 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>