I know this question is really synology specific but I didnt get any help in their forums. I managed to mount my drive via rclone on my synology NAS. I did this via a mount command an a screen. Now the problem is that the mount is breaking everytime the nas isnt doing anything. In the mount folders the files just diappear and I have to unmount (fusermount -uz) and remount again.
It probably hibernates and that breaks the mount. I cant install a systemd daemon service on that nas as far as I know ( I got the ds218+). Did anyone got a mount working without it breaking all the time? I know that I could make a script that remounts it but I am not good in linux. Could someone help me making a script ?
Thank you all very much
rclone mount gdrive: /volume1/homes/nico/mount/m1 -vvv --allow-other --buffer-size 1G --dir-cache-time 72h --drive-chunk-size 256M --fast-list --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off --vfs-cache-mode writes --drive-acknowledge-abuse=true
rclone v1.48.0
os/arch: linux/amd64
go version: go1.12.6
logs are hard because the mount seems to simply vanish. I tried with a script that just has the mount command in it but I didnt get it to work. Doing the command manually works tho
I will try that (deleting these 2 tags). But the strange thing is that it stays active if I do something (scanning in files for plex for example) but if I leave it be and the nas goes into hibernation it brakes. So I would need a script that autostarts rclone after hibernation / sleep mode. But I dont know how write the script.
2019/08/31 14:09:21 ERROR : Couldn't find home directory or read HOME or XDG_CONFIG_HOME environment variables.
2019/08/31 14:09:21 ERROR : Defaulting to storing config in current directory.
2019/08/31 14:09:21 ERROR : Use --config flag to workaround.
2019/08/31 14:09:21 ERROR : Error was: exec: "getent": executable file not found in $PATH
2019/08/31 14:09:21 DEBUG : rclone: Version "v1.48.0" starting with parameters ["rclone" "mount" "gdrive:" "/volume1/homes/nico/mount/m1" "-vvv" "--allow-other" "--dir-cache-time" "72h" "--drive-chunk-size" "256M" "--vfs-read-chunk-size" "128M" "--vfs-read-chunk-size-limit" "off" "--vfs-cache-mode" "writes" "--drive-acknowledge-abuse=true"]
2019/08/31 14:09:21 NOTICE: Config file "/.rclone.conf" not found - using defaults
2019/08/31 14:09:21 Failed to create file system for "gdrive:": didn't find section in config file
I pretty much get the same errors. Now the task sheduler is set with my user
/volume1/homes/nico/scripts/mount.sh: line 1: $'\r': command not found
2019/08/31 14:35:57 ERROR : Couldn't find home directory or read HOME or XDG_CONFIG_HOME environment variables.
2019/08/31 14:35:57 ERROR : Defaulting to storing config in current directory.
2019/08/31 14:35:57 ERROR : Use --config flag to workaround.
2019/08/31 14:35:57 ERROR : Error was: exec: "getent": executable file not found in $PATH
2019/08/31 14:35:58 DEBUG : rclone: Version "v1.48.0" starting with parameters ["rclone" "mount" "gdrive:" "/volume1/homes/nico/mount/m1" "-vvv" "--allow-other" "--dir-cache-time" "72h" "--drive-chunk-size" "256M" "--vfs-read-chunk-size" "128M" "--vfs-read-chunk-size-limit" "off" "--vfs-cache-mode" "writes" "--drive-acknowledge-abuse=true"]
2019/08/31 14:35:58 NOTICE: Config file "/.rclone.conf" not found - using defaults
2019/08/31 14:35:58 Failed to create file system for "gdrive:": didn't find section in config file
sorry if I am not stating everything here correct. I put a .sh script in synology that simply has the mount command from before in it and activates after a boot. These errors are what comes from that script. If I run the mount command manually via cli everything works. But after a restart etc it breaks
if you need to mointor what happens over time, you can use
--log-file=mylogfile.txt
I'd recommend using it in combination with
-vv
to get the fullly verbose debug output for troubleshooting
Depending on what user you are currently running as the default locations rclone will look for config file is different (relative to each user). That's almost certainly why you get those errors about not finding the config.
It is however possible to manually set the config location with a flag
--config=CONFIG_FILE
Specify the location of the rclone config file.
Normally the config file is in your home directory as a file called .config/rclone/rclone.conf (or .rclone.conf if created with an older version). If $XDG_CONFIG_HOME is set it will be at $XDG_CONFIG_HOME/rclone/rclone.conf.
If there is a file rclone.conf in the same directory as the rclone executable it will be preferred. This file must be created manually for Rclone to use it, it will never be created automatically.
If you run rclone config file you will see where the default location is for you.
Use this flag to override the config location, eg rclone --config=".myconfig" .config.
Of course if that location is different from what you have used so far you still need to copy your existing config there, or else make it again. rclone doesn't d that for you.