Mount Drive during Boot

What is the problem you are having with rclone?

Cant get the drive to mount on boot.

What is your rclone version (output from rclone version)

rclone v1.55.1

  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.3
  • go/linking: static
  • go/tags: none

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

Google Drive

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

# /etc/systemd/system/rclone.service
Description=Google Drive (rclone)

ExecStart=/usr/bin/rclone mount \
        --config=/root/.config/rclone/rclone.conf \
        --allow-other \
        --cache-tmp-upload-path=/media/hdd/rclone/upload \
        --cache-chunk-path=/media/hdd/rclone/chunks \
        --cache-workers=4 \
        --cache-writes \
        --cache-dir=/media/hdd/rclone/vfs \
        --cache-db-path=/media/hdd/rclone/db \
        --no-modtime \
        --drive-use-trash \
        --stats=0 \
        --checkers=16 \
        --dir-cache-time=60m \
        --allow-non-empty \
        --allow-other \
        --vfs-cache-mode=full \
        --cache-info-age=60m gdrive:/ /mnt/gdrive
ExecStop=/bin/fusermount -u /mnt/gdrive


If I manually start it with just by copy pasting it in the command line, the drive mounts, if I check status (systemctl status rclone) it says running but no drive mounted.

Add in a log file.

--log-file /tmp/rclone.log

and put it into debug

--log-level DEBUG

or you can do


Both put it into debug and share the log.

Missing your rclone.conf as well so hard to figure out what flags may or may not work.

Shouldn't be used.

That's all for the cache backend, which I imagine you aren't using since you have

1 Like

First of all, thank you for the reply mate..

Im new to rclone, so what im trying to achieve is use this linux VM as a NAS device on my network, so mount G Drive, and then share it thru samba and such.

I disable this and it started working on boot:

What was weird, is that i got zero errors in the log.

The "--allow-non-empty " flag, is there because docker creates those folders before rclone mounts the drive, havent found out a way to delay docker service start until rclone is mounted.

In systemd, you can do things like:

Wants=rclone.service rclone.service

So you have something not start if the rclone service is not running or after depending on how much you want to lock it down.

Can you share the log?

How do you know it's not mounted?

Well, it didn't seem mounted, i would cd to the supposed mounted directory and it would be empty.
I assume you only need the header and not it checking all the directories:

In little words what's the difference between VFS and the other cache mode?
Using radarr in VFS mode, it used to import the "movie" into the cache folder, and then signaled as processed, now it seams like its uploading directly.
Is VFS better?

That log shows it was mounted and things were reading it so it does seem it was 'working'.

I personally use:

It really depends on what you want and what your setup is. I have a disk I use for cache to help streaming and it can work without (cache mode off) as well as it worked for many months before that new mode existed.

The rclone cache backend is deprecated and has a lot of bugs and really should not be used, but doesn't seem like you are using it anyway.

So any of those flags won't do anything unless you are using a cache remote (which you don't seem to be).

It's all workflow and what you want to setup. I use mergerfs and a local disk for all my writes and I mainly read for my rclone mount. Some people just use full mode and write directly. It all depends on what you want and how you'd like it setup. I use mergerfs because I want to use hard links.

Ok, so I re enabled VFS, now the folder doesn't mount again :frowning:

2021/05/04 22:13:34 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/05/04 22:13:34 DEBUG : rclone: Version "v1.55.1" starting with parameters ["/usr/bin/rclone" "mount" "--config=/root/.config/rclone/rclone.conf" "--allow-other" "--cache-dir=/media/hdd/rclone/vfs" "--no-modtime" "--drive-use-trash">
2021/05/04 22:13:34 DEBUG : Creating backend with remote "gdrive:/"
2021/05/04 22:13:34 DEBUG : gdrive: detected overridden config - adding "{6Cm8i}" suffix to name
2021/05/04 22:13:34 DEBUG : fs cache: renaming cache item "gdrive:/" to be canonical "gdrive{6Cm8i}:"
2021/05/04 22:13:35 DEBUG : vfs cache: root is "/media/hdd/rclone/vfs/vfs/gdrive{6Cm8i}"
2021/05/04 22:13:35 DEBUG : vfs cache: metadata root is "/media/hdd/rclone/vfs/vfs/gdrive{6Cm8i}"
2021/05/04 22:13:35 DEBUG : Creating backend with remote "/media/hdd/rclone/vfs/vfs/gdrive{6Cm8i}"
2021/05/04 22:13:37 DEBUG : MEDIA/FILMES/Feel the Beat (2020)/Feel.the.Beat.2020.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-CMRG.mkv: vfs cache: truncate to size=5304334690
2021/05/04 22:13:38 DEBUG : MEDIA/FILMES/Feel the Beat (2020)/Feel.the.Beat.2020.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-CMRG.mkv: vfs cache: setting modification time to 2021-05-04 19:11:34.662904552 +0100 WEST
2021/05/04 22:13:38 INFO  : MEDIA/FILMES/Feel the Beat (2020)/Feel.the.Beat.2020.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-CMRG.mkv: vfs cache: queuing for upload in 5s
2021/05/04 22:13:43 DEBUG : MEDIA/FILMES/Feel the Beat (2020): Added virtual directory entry vAddFile: "Feel.the.Beat.2020.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-CMRG.mkv"

Its seams mounted, but when i go into the folder, its empty.

Looks like you have something queued for upload so it has to upload before it becomes active.

1 Like

Oh, I feel like an idiot atm. Thank you so much.

Any other suggestions for me to get my "NAS" working better?

I've shared above, which is my service file for my situation and use case. I find that works pretty well for me so there is a bit of trial and error to see what works best with your setup.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.