Hi, the problem I am having is that the service that starts rclone does not mount the drive for the plex server.
It is all mounted with google drive.
That is, if I use this command that I put below the drive if it is mounted, but what I want is that it is mounted as a service.
rclone mount --allow-other --allow-non-empty -v drive: /home/rclone &
The mount is done on drive:/home/rclone
I have the service file located at:
/etc/systemd/system
The name you have set is: rclonescript.service (with permissions 777)
The commands I use to start the service: systemctl daemon-reload systemctl start rclonescript.service systemctl enable rclonescript.service (not very necessary yet as I don't want it to run at startup)
I have a configuration that I found browsing but I don't know how it would work for me, as I can't run it I don't know how it works for the plex server.
I would also appreciate if someone could give me some suitable values adjusting to the characteristics of the server (200GB NVME, 30GB RAM, 8vCores), mostly to be able to play 4K, Remux, etc ....
Thank you for the welcome message.
Looking at the configuration you have passed me, I have put it according to the route of my assemblies, but I do not know if it is well constructed.
[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount drive: /home\rclone
# This is for allowing users other than the user running rclone access to the mount
--allow-other \
# Google Drive is a polling remote so this value can be set very high and any changes are detected via polling.
--dir-cache-time 5000h \
# Log file location
--log-file /opt/rclone/logs/rclone.log \
# Set the log level
--log-level NOTICE \
# I reduce the poll interval down to 10 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 10s \
# This is setting the file permission on the mount to user and group have the same access and other can read
--umask 002 \
# Please set this to your own value below
--user-agent someappname101 \
# This sets up the remote control daemon so you can issue rc commands locally
--rc \
# This is the default port it runs on
--rc-addr :5572 \
# no-auth is used as no one else uses my server and it is not a shared seedbox
--rc-no-auth \
# The local disk used for caching
--cache-dir=/tmp/cache \
#
# My quota per user / per 100 seconds is 20,000 requests. This can be found in your quota section.
# This changes the sleep calls to something much lower to take advantage of the API boost.
# change the min sleep from 100ms
--drive-pacer-min-sleep 10ms \
# Changing to have the ability to burst higher
--drive-pacer-burst 200 \
# This is used for caching files to local disk for streaming
--vfs-cache-mode full \
# This limits the cache size to the value below
--vfs-cache-max-size 250G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 5000h \
# The polling interval for increased based on there is enough buffer space
--vfs-cache-poll-interval 5m \
# This sets a per file bandwidth control and I limit this to a little bigger than my largest bitrate I'd want to play
--bwlimit-file 32M
ExecStop=/bin/fusermount -uz /home/rclone
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 _async=true
Restart=on-failure
User= I don't know which is my user, by default it can be root?
Group= I don't know what my group is, I guess it's the default one but I don't know which one it is.
[Install]
WantedBy=multi-user.target
Considering that with this command if it worked for me:
rclone mount --allow-other --allow-non-empty -v drive: /home/rclone &
Well, I just want to see if I have built the configuration right.
Nothing, I can't get it to work with this configuration.....
[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 drive: /home\rclone
# This is for allowing users other than the user running rclone access to the mount
--allow-other \
# Google Drive is a polling remote so this value can be set very high and any changes are detected via polling.
--dir-cache-time 5000h \
# Log file location
--log-file /opt/rclone/logs/rclone.log \
# Set the log level
--log-level NOTICE \
# I reduce the poll interval down to 10 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 10s \
# This is setting the file permission on the mount to user and group have the same access and other can read
--umask 002 \
# Please set this to your own value below
--user-agent someappname101 \
# This sets up the remote control daemon so you can issue rc commands locally
--rc \
# This is the default port it runs on
--rc-addr :5572 \
# no-auth is used as no one else uses my server and it is not a shared seedbox
--rc-no-auth \
# The local disk used for caching
--cache-dir=/tmp/cache \
#
# My quota per user / per 100 seconds is 20,000 requests. This can be found in your quota section.
# This changes the sleep calls to something much lower to take advantage of the API boost.
# change the min sleep from 100ms
--drive-pacer-min-sleep 10ms \
# Changing to have the ability to burst higher
--drive-pacer-burst 200 \
# This is used for caching files to local disk for streaming
--vfs-cache-mode full \
# This limits the cache size to the value below
--vfs-cache-max-size 250G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 5000h \
# The polling interval for increased based on there is enough buffer space
--vfs-cache-poll-interval 5m \
# This sets a per file bandwidth control and I limit this to a little bigger than my largest bitrate I'd want to play
--bwlimit-file 32M
ExecStop=/bin/fusermount -uz /home/rclone
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
I made the changes you told me and it still doesn't work.
The configuration looks like this:
[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 drive: /home/rclone
# This is for allowing users other than the user running rclone access to the mount
--allow-other \
# Google Drive is a polling remote so this value can be set very high and any changes are detected via polling.
--dir-cache-time 5000h \
# Log file location
--log-file /opt/rclone/logs/rclone.log \
# Set the log level
--log-level NOTICE \
# I reduce the poll interval down to 10 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 10s \
# This is setting the file permission on the mount to user and group have the same access and other can read
--umask 002 \
# Please set this to your own value below
--user-agent someappname101 \
# This sets up the remote control daemon so you can issue rc commands locally
--rc \
# This is the default port it runs on
--rc-addr :5572 \
# no-auth is used as no one else uses my server and it is not a shared seedbox
--rc-no-auth \
# The local disk used for caching
--cache-dir=/tmp/cache \
#
# My quota per user / per 100 seconds is 20,000 requests. This can be found in your quota section.
# This changes the sleep calls to something much lower to take advantage of the API boost.
# change the min sleep from 100ms
--drive-pacer-min-sleep 10ms \
# Changing to have the ability to burst higher
--drive-pacer-burst 200 \
# This is used for caching files to local disk for streaming
--vfs-cache-mode full \
# This limits the cache size to the value below
--vfs-cache-max-size 250G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 5000h \
# The polling interval for increased based on there is enough buffer space
--vfs-cache-poll-interval 5m \
# This sets a per file bandwidth control and I limit this to a little bigger than my largest bitrate I'd want to play
--bwlimit-file 32M
ExecStop=/bin/fusermount -uz /home/rclone
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
i would remove --allow-non-empty unless you have a very specific reason?
both commands should output at debug level rclone mount drive: /home/rclone --allow-other --log-level DEBUG
or rclone mount drive: /home/rclone --allow-other -vv
Does the /opt/rclone/logs/rclone.log file exist at the location specified? In my experience rclone will not start if the file isn't there. I would check all other paths in the service file too. If the log file exists check it also for any errors from rclone.
That's not correct as you just need permissions to write the log file.
If the directory path is missing or there are not correct permissions it would create an error.
rclone mount GD: /home/felix/test --log-file /not/real/rclone.log -vvv
2022/08/07 17:10:06 DEBUG : Setting --config "/opt/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/opt/rclone/rclone.conf"
2022/08/07 17:10:06 Failed to open log file: open /not/real/rclone.log: no such file or directory
and
felix@gemini:~$ ls /tmp/rclone.log
ls: cannot access '/tmp/rclone.log': No such file or directory
felix@gemini:~$ rclone mount GD: /home/felix/test --log-file /tmp/rclone.log -vvv
2022/08/07 17:10:31 DEBUG : Setting --config "/opt/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/opt/rclone/rclone.conf"
^Cfelix@gemini:~$ ls /tmp/rclone.log
/tmp/rclone.log
felix@gemini:~$ tail -5 /tmp/rclone.log
2022/08/07 17:10:31 DEBUG : : Root:
2022/08/07 17:10:31 DEBUG : : >Root: node=/, err=<nil>
2022/08/07 17:10:33 INFO : Signal received: interrupt
2022/08/07 17:10:33 ERROR : /home/felix/test: Unmounted rclone mount
2022/08/07 17:10:33 INFO : Exiting...
felix@gemini:~$