I have spent litrally a whole day trying to get my rclone to mount but as a service at startup and even though I have partialy failed i have learned a hell of a lot doing so.
I have read and followed alot of guidance by @Animosity022 replying to other users with a similar issue trying differnt things to get the service to start and actullay do what I can by running a command Manually.
Its now at the point where the service starts successfully but the google drive isn't viewable where it should be mounted.
What is the problem you are having with rclone?
Correctly mounting rclone at startup
What is your rclone version
- os/arch: linux/amd64
- go version: go1.15.5
Which OS you are using and how many bits?
Debian 4.19.160-2 (2020-11-28) x86_64
Which cloud storage system are you using?
The command you were trying to run
rclone mount --allow-non-empty --vfs-cache-mode=writes --allow-other --cache-db-purge gcache: /mnt/downloadhd/gdrive &
The rclone service config.
Service config evolution
A log from the command with the
I'd recommend to not use the cache backend.
Your service file needs to have a backslash at the end of the lines that continue on as the execstart is over multiple lines.
An example would be something like this:
ExecStart=/usr/bin/rclone mount gcrypt: /GD \
--dir-cache-time 1000h \
--log-level NOTICE \
--log-file /opt/rclone/logs/rclone.log \
--poll-interval 15s \
--umask 002 \
--user-agent randomappname101 \
--rc-addr :5572 \
--vfs-cache-mode full \
--vfs-cache-max-size 500G \
--vfs-cache-max-age 336h \
Notice the final line does not have the \ on it.
And there you have it @Animosity022 you nailed it on the first response
Previously when i added my rclone remote and mount location:
I was getting a failed service start about to many exceptions:
Command mount needs 2 arguments maximum: you provided 3 non flag arguments
This only stopped when i removed the mount location but resulted in the service starting but the drive not mounting correctly.
By removing the \ on the last flag allowed me to add my re-add my mount location, start the service and see my drive where it needed it to be
So my correct winning service config is:
ExecStart=/usr/bin/rclone mount gdrive: /mnt/downloadhd/gdrive \
--config /home/container/.config/rclone/rclone.conf \
--max-transfer 750G \
--vfs-cache-mode writes \
--log-level INFO \
ExecStop=/bin/fusermount -u /mnt/downloadhd/gdrive
Thanks for your swift response and resolution have a Merry Xmas
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.