Rclone / gdrive / Plex setup

Hi guys,

I'm quite new to both Rclone and Linux so apologies off this sounds silly or is basic.

I have setup Rclone with Gdrive and Plex on a VPS which is working fine. I have now tried to do the same on a dedi that will solely run Plex. I have installed Rclone, Fuse, setup the Google Api etc and all seems to be ok. One thing I'm not sure about is the rclone.service file. I was expecting to find this in /etc/systemd... but it is not there. I'm assuming there is one as Rclone is running and did so after a re-start. Am I missing something or is this not needed?

I have also added a cron job to re-mount my drive on reboot using:
rclone mount gdrive: /home/gdrive --allow-other --buffer-size 256M --dir-cache-time 96h --timeout 1h --umask 002 --daemon
Does this look correct? I did read about utilising cache for Plex, is this recommended?

Many thanks!

hello and welcome to the forum,

i am not a linux expert but i have used this command to list all systemd services that are active
systemctl --type=service --state=active

this is the go to guide from one of the forum members.
https://github.com/animosity22/homescripts

there are two caches that can be used with rclone mount.
many web pages on reddit and elsewhere that suggest using a cache remote but those are mistaken.
https://rclone.org/cache/#status

the other cache is the vfs cache, most users set this flag.
https://rclone.org/commands/rclone_mount/#vfs-cache-mode-full

Thank you! I have found online that I needed to manually create the rclone.service file.

Do I need the service file if I am running the @reboot mount command as a cron?

I did / was following the go to guide but I think I ended up confusing myself unfortunately. I added the rclone.service file after editing it for my config and I broke it... the service would not start and after a reboot the mount did not appear. If I take that out and re-start the mount re-appears automatically from the reboot command in cron

100% confused myself now lol

systemd vs cron, that is your choice.

well, that does not provide much info.
add a debug log to rclone.
for testing, you can run a systemd service from the command line and systemd itself keeps a log.

also, post the service file, blockquote it when posting.

Sorry about that. ok so:

I have removed the cron to save confusion.
When I attempt to start the rclone.service I receive rclone.service failed because the control process exited with error code. I'm unsure as to find out the error though?

service file

Blockquote
[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/root/.config/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount gdrive: /home/gdrive
--allow-other
--dir-cache-time 96h
--log-level INFO
--log-file /home/log/rclone.log
--poll-interval 15s
--umask 002
--user-agent plrclone
--rc
--rc-addr :5572
--rc-no-auth
--cache-dir=/cache
--vfs-cache-mode full
--vfs-cache-max-size 200G
--vfs-cache-max-age 336h
--bwlimit-file 16M
ExecStop=/bin/fusermount -uz /GD
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 _async=true
Restart=on-failure
User=root
Group=root
[Install]
WantedBy=multi-user.target

there should be \ at the end of the lines
also, you use both
/home/gdrive
and
/GD

Thank you. I do have the \ in the file, not sure how I find;t copy them across.

Thanks for pointing out the /GD, I'll have a look

ok, try to enclose the text in triple back quotes before and after the text.
image

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