How mount on boot for Synology?

What is the problem you are having with rclone?

I want to get my mount to connect when booting

What is your rclone version (output from rclone version)

rclone v1.57.0

  • os/version: unknown
  • os/kernel: 4.4.180+ (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

rclone FTP to my seedbox

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount seedbox:/files/rclone /volume1/Data/Torrents/seedbox --allow-other

The rclone config contents with secrets removed.

I don't know where the config file is on my Synology DS1621 NAS

A log from the command with the -vv flag

Not sure where to find the log either.

I'm very much learning as I go, but have managed to get as far as being able to mount the seedbox remote folder to a local NAS folder (/volume1/Data/Torrents/seedbox).
It works, but I need to ssh into the NAS and run '''sudo rclone mount seedbox:/files/rclone /volume1/Data/Torrents/seedbox --allow-other'''

I would like to be able to mount it whenever the NAS reboots, rather than needing to ssh & do it manually.
Would anyone have any pointers for me please?

hi,
use the synbox web interface, task scheduler.

Many thanks for the reply. I'm not sure what "synbox web interface" is. Does it just mean the Synology Desktop interface?

I've tried doing a few things with Task Scheduler, but with no luck.

I've tried pasting

#!/bin/bash

rclone mount seedbox:/files/rclone /volume1/Data/Torrents/seedbox --allow-other

into the User Defined Script box, and also tried making a .sh file with that text in (and making it executable), and also tried without the #!/bin/bash but nothing worked - I really am a Linux novice, so I'm kind of guessing & grabbing points from various other posts here.

  • best of use a .sh file

  • with rclone, use full path
    --- the location of rclone exectuable, get that from which rclone
    --- the location of the rclone config file, using --config, get that with rclone config file
    something like
    /usr/rclone mount seedbox:/files/rclone /volume1/Data/Torrents/seedbox --allow-other --config=/var/services/homes/putyourusenamehere/.config/rclone/rclone.conf

  • by default, synboxes with sh, not bash

 echo "$SHELL"
/bin/sh
  • as for task scheduler, cannot just use the .sh filename, need to have an executable.
    image

I really appreciate your help on this. I'm going through it, and hopefully, I'll succeed in the end. I'll update later.

Well, I've got further than before.

I have a .sh file saved /volume1/Data/Torrents/script/mount.sh which is now executable.

It contains

/bin/sh

rclone mount seedbox:/files/rclone /volume1/Data/Torrents/seedbox --allow-other --config=/root/.config/rclone/rclone.conf

I couldn't get it to work starting it with /usr/rclone

In Task Scheduler, I have sh /volume1/Data/Torrents/script/mount.sh

I can manually run this, and it works fine, so that's a step forward.

On boot though, the log gives me

2022/01/03 20:12:47 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2022/01/03 20:12:47 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
  • sorry, should be /bin/rclone

not sure i understand?
--- via the command line, the rclone mount works?
--- ls /volume1/Data/Torrents/seedbox, shows the files in seedbox:/files/rclone?

but when run using task scheduler, the rclone mount does not work?

need to install fuse
https://synocommunity.com/package/synocli-disk

Sorry, I should have been more clear.

When I go into Task Scheduler, I can highlight the rclone mount task that I have saved in there, and select RUN from the menu bar. This seems to work as I can then see the files from my remote seedbox on in the folder /volume1/Data/Torrents/seedbox

I'm going to try your latest suggestions. Thanks again for the advice.

really, best to do this in steps.
step 1. getting rclone mount to work on command line using a sh script.

Sounds like a plan.

Running (with sudo)
/bin/rclone mount seedbox:/files/rclone /volume1/Data/Torrents/seedbox --allow-other --config=/root/.config/rclone/rclone.conf

mounts fine, and I can see the remote seedbox files on my NAS at /volume1/Data/Torrents/seedbox/

I've installed SynoCli Disk Tools, which shows as running.

I still get an error when trying to run the task from boot though.

2022/01/03 21:34:15 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2022/01/03 21:34:15 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Could there be a step for Fuse that I've missed or something?

I'll need to try again in the morning now I think. Dog walking has to be done.

ok, next time add a rclone debug log.
--log-level=DEBUG --log-file=/volume1/Data/Torrents/script/rclone.log

So, by adding --log-level=DEBUG --log-file=/volume1/Data/Torrents/script/rclone.log

and therefore using

/bin/sh

/bin/rclone mount seedbox:/files/rclone /volume1/Data/Torrents/seedbox --allow-other --config=/root/.config/rclone/rclone.conf --log-level=DEBUG --log-file=/volume1/Data/Torrents/script/rclone.log

inside my mount.sh file, it now outputs as the usual log it spits out

2022/01/04 06:37:06 DEBUG : Home directory lookup failed and cannot be used as configuration location: exec: "getent": executable file not found in $PATH

along with a new rclone.log

2022/01/04 06:37:07 DEBUG : rclone: Version "v1.57.0" starting with parameters ["/bin/rclone" "mount" "seedbox:/files/rclone" "/volume1/Data/Torrents/seedbox" "--allow-other" "--config=/root/.config/rclone/rclone.conf" "--log-level=DEBUG" "--log-file=/volume1/Data/Torrents/script/rclone.log"]
2022/01/04 06:37:07 DEBUG : Creating backend with remote "seedbox:/files/rclone"
2022/01/04 06:37:07 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/01/04 06:37:07 DEBUG : ftp://lwxxx.xxxx.me:21/files/rclone: Connecting to FTP server
2022/01/04 06:37:07 INFO  : ftp://lwxxx.xxxx.me:21/files/rclone: poll-interval is not supported by this remote
2022/01/04 06:37:07 DEBUG : ftp://lwxxx.xxxx.me:21/files/rclone: Mounting on "/volume1/Data/Torrents/seedbox"
2022/01/04 06:37:07 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2022/01/04 06:37:07 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

(xxx'd out a few details)

Adding modprobe fuse into my mount.sh file, looks like it might have done the trick?

I have a large rclone.log file, that starts

2022/01/04 07:05:29 DEBUG : rclone: Version "v1.57.0" starting with parameters ["/bin/rclone" "mount" "seedbox:/files/rclone" "/volume1/Data/Torrents/seedbox" "--allow-other" "--config=/root/.config/rclone/rclone.conf" "--log-level=DEBUG" "--log-file=/volume1/Data/Torrents/script/rclone.log"]
2022/01/04 07:05:29 DEBUG : Creating backend with remote "seedbox:/files/rclone"
2022/01/04 07:05:29 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/01/04 07:05:29 DEBUG : ftp://lw996.xxxx.me:21/files/rclone: Connecting to FTP server
2022/01/04 07:05:29 INFO  : ftp://lw996.xxxx.me:21/files/rclone: poll-interval is not supported by this remote
2022/01/04 07:05:29 DEBUG : ftp://lw996.xxxx.me:21/files/rclone: Mounting on "/volume1/Data/Torrents/seedbox"
2022/01/04 07:05:29 DEBUG : : Root: 
2022/01/04 07:05:29 DEBUG : : >Root: node=/, err=<nil>
2022/01/04 07:05:43 DEBUG : /: Attr: 
2022/01/04 07:05:43 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2022/01/04 07:05:43 DEBUG : : Statfs: 
2022/01/04 07:05:43 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>

My output log shows

2022/01/04 07:05:28 DEBUG : Home directory lookup failed and cannot be used as configuration location: exec: "getent": executable file not found in $PATH

but the files on my seedbox are now showing after a boot sequence.

I'll test it with some more files, but it looks ok I think.

Thank you so much for the help.

sure, and i learned something, about modprobe fuse

not sure, but with ftp, there can be a difference between these two paths, as per the documentation.
the seedbox, might not permit access to home dir, which is the case with my seedbox.

seedbox:/files
and
seedbox:files
so might test the second path and let's see what happens.

fwiw, imho, ftp is a terrible backend.
if your seedbox offers sftp, then i would use it.

It does offer sftp.

I went with ftp to start with to see if I could get it going.
Now that I have, I will look into switching to sftp. Might just be a case of editing the rclone mount from ftp to sftp, but I'll start looking into it.

that will not work, need to create a remote for sftp.

I meant going through rclone config, and switching/inputing new details from ftp to sftp. Would that not work with all new details, or should I just create an additional mount to the one I already have working, then pointing my mount.sh to the new remote?

that will work, no need for additional mount,
just tweak mount.sh,
for rclone mount seedbox:, change seedbox, to the name of the new sftp remote.

did you try my suggestion to get rid of this message, i would like to know?
could be that your seedbox, like my seedbox, does not allow access to a login console.
Home directory lookup failed and cannot be used as configuration location: exec: "getent": executable file not found in $PATH

and not sure your exact use case, but there are some difference between ftp and sftp.
for example,
--- the seedbox ftp serer might not support modtime, whereas sftp does. can confirm as documented here
--- ftp does not support hash, but some/most sftp servers do, but many seedboxes using sftp do not.

you can check if you seedbox supports md5 hash
connect once to the sftp server and then check rclone.conf file.
if the sftp server supports md5 hash, then should see
md5sum_command = md5 -r
if the sftp server does not support md5 hash, then should see
md5sum_command = none

did you try my suggestion to get rid of this message, i would like to know?
could be that your seebox, like my seedbox, does not allow access to a login console.
Home directory lookup failed and cannot be used as configuration location: exec: "getent": executable file not found in $PATH

I'll try this out first........

Doesn't seem to change anything.

2022/01/04 14:51:35 DEBUG : Home directory lookup failed and cannot be used as configuration location: exec: "getent": executable file not found in $PATH

is sill produced in the log after changing to

/bin/sh

modprobe fuse

/bin/rclone mount seedbox:files/rclone /volume1/Data/Torrents/seedbox --allow-other --config=/root/.config/rclone/rclone.conf --log-level=DEBUG --log-file=/volume1/Data/Torrents/script/rclone.log

The mount still works though, so I'm not too concerned with it.