Google Drive Mount Point Deleted on Reboot

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

I set up Rclone using a method that I used a few years ago. I make (mkdir) a mount directory /home/rammjet/Gdrive. It populates with my Google Drive files. On reboot, /home/rammjet/Gdrive, is gone and Rclone fails.

Run the command 'rclone version' and share the full output of the command.

rclone v1.53.3-DEV

  • os/arch: linux/amd64
  • go version: go1.18.1

No. This is from the Linux Mint repository.

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)

Description=Google Drive (rclone)

ExecStartPre=/bin/mkdir -p /home/rammjet/Gdrive
ExecStart=/usr/bin/rclone mount \
        --config=/home/rammjet/.config/rclone/rclone.conf \
        --allow-non-empty \
        --cache-tmp-upload-path=/tmp/rclone/upload \
        --cache-chunk-path=/tmp/rclone/chunks \
        --cache-workers=8 \
        --cache-writes \
        --cache-dir=/tmp/rclone/vfs \
        --cache-db-path=/tmp/rclone/db \
        --no-modtime \
        --drive-use-trash \
        --stats=0 \
        --checkers=16 \
        --bwlimit=40M \
        --dir-cache-time=60m \
        --vfs-cache-mode full \
        --vfs-cache-max-size 100M \
        --log-level DEBUG \
        --log-file /tmp/rclone.log \
        --umask 022 \
        --allow-other \
        --cache-info-age=60m gdrive:/ /home/rammjet/Gdrive
ExecStop=/usr/bin/fusermount -u /home/rammjet/Gdrive
ExecStop=/bin/rmdir /home/rammjet/Gdrive


The rclone config contents with secrets removed.

type = drive
scope = drive
token = {"access_token":"secret stuff>

A log from the command with the -vv flag

This is how I found the problem:

sudo systemctl status rclone
[sudo] password for rammjet:         
○ rclone.service - Google Drive (rclone)
     Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
     Assert: start assertion failed at Sat 2023-07-15 19:22:59 EDT; 21min ago
             AssertPathIsDirectory=/home/rammjet/Gdrive was not met

Jul 15 19:20:31 rammjet-TH50 systemd[1]: rclone.service: Starting requested but asserts failed.
Jul 15 19:20:31 rammjet-TH50 systemd[1]: Assertion failed for Google Drive (rclone).
Jul 15 19:22:59 rammjet-TH50 systemd[1]: rclone.service: Starting requested but asserts failed.
Jul 15 19:22:59 rammjet-TH50 systemd[1]: Assertion failed for Google Drive (rclone).

Problem you described has nothing to do with rclone but with your OS and systemd behaviour. I suggest you consult linux mint documentation and/or forums.

You are absolutely correct @kapitainsky

I realized what the problem was in the middle of the night.

The service I listed above deletes the directory when it stops. It creates the directory when it starts. But before it starts, it asserts that the directory exists. This fails before the directory gets created.

I removed AssertPathIsDirectory=/home/rammjet/Gdrive from the service and now it works fine.

1 Like

Also stop using ancient version of rclone. For whatever reason your linux distribution maintainers do very bad job.

sudo apt-get remove rclone

and then:

sudo -v ; curl | sudo bash

to keep up to date you can run from time to time:

sudo rclone selfupdate

Other issue is you should not be using cache remote - it is deprecated. You should use vfs instead.

And you have both in your mount command so not only you waste disk space caching everything twice but potentially are looking for trouble:)

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