Rclone mount on synology that doesnt break periodically

hello there

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 version is what?

What's your command? What's the log with -vv?

All the stuff in the question template that pops up basically.

hei there and sorry.

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'd guess you run out of memory and it crashes since you have a huge buffer size.

That means 1GB of memory per file opened. I'd remove that and start with the default. What is the memory on the system?

Can be removed. Does nothing on a mount.

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.

6GB of memory

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

A lot of problems here

What does:

rclone config file

Show?

It seems to be complaining it cannot find your rclone.conf file.

/var/services/homes/nico/.config/rclone/rclone.conf

Can you share the whole output?

Example:

root@gemini:~# rclone config file
Configuration file doesn't exist, but rclone will use this path:
/root/.config/rclone/rclone.conf
root@gemini:~# exit
logout
felix@gemini:~$ rclone config file
Configuration file is stored at:
/opt/rclone/rclone.conf
felix@gemini:~$

This was the whole output when logged in as user nico

rclone config file
Configuration file is stored at:
/var/services/homes/nico/.config/rclone/rclone.conf

Can you share the same thing with the command you are running? Are you running it as the same user 'nico'?

I am running this script (wich only has the mount command in it) as root, will change that now and try it again

You'd need to run the commands all as the same user to troubleshoot it.

Basically as I shared above, my root doesn't have a rclone.conf, but my rclone user does.

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

I can't tell what you are running. Can you run without any script and just share the output of what you are trying?

Use 3 backtics `

and you can put them in like this

3 before

you get this

3 after

of the back tics.

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.

1 Like

wow that fixed it. running the command now without the -buffer-size 1G and with the --config= and the mount is still here after a boot!

I thank you two very much!

That would be exactly why I was asking for the command :rofl:

It was the same command all the time tho.