What is the problem you are having with rclone?
When I mount some of my HTTP backend they just go to background automatically. But some of them aren't. They just stay at the terminal. if I press "Ctrl+C" they just umount but for the background backends, I've to enter umount command to unmount.
The problem I'm facing is systemd service detects the background mounts as failed & restart the service. My log files are full with "Fatal error: Directory already mounted, use --allow-non-empty to mount anyway: /home/plex/SamFTP/English" only for the backends that are straight going to the background. But I've put the same command for both of them.
Note: I use those two for Plex & everything is working there it's just systemd goes crazy & my log files are filling up.
Run the command 'rclone version' and share the full output of the command.
rclone v1.57.0
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-91-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.2
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
http
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
Here is a backend systemd service that DON'T go to background & systemd detects as active (running)
[Unit]
Description=RClone Documentary
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
User=plex
Group=plex
ExecStart=/usr/bin/rclone mount Documentary: /home/plex/SamFTP/WebSeries/Documentary --allow-other --dir-cache-time 24h --log-file=/home/plex/Logs/Documentary.txt --poll-interval 10s --umask 002 --cache-dir=/home/plex/cache --vfs-cache-mode full --vfs-cache-max-size 50G --vfs-cache-max-age 720h --vfs-cache-poll-interval 5m --vfs-read-ahead 2G
ExecStop=/usr/bin/fusermount -uz /home/plex/SamFTP/WebSeries/Documentary
RestartSec=3
Restart=on-failure
KillMode=none
[Install]
WantedBy=multi-user.target
Here is a backend systemd service that GO to background & systemd detects as failed (Result: timeout)
● RafidrcloneEnglish.service - RClone English
Loaded: loaded (/etc/systemd/system/RafidrcloneEnglish.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Thu 2022-01-13 01:07:24 +06; 16min ago
Main PID: 644
Tasks: 12 (limit: 4399)
Memory: 202.8M
CGroup: /system.slice/RafidrcloneEnglish.service
└─644 /usr/bin/rclone mount English: /home/plex/SamFTP/English --allow-other --dir-cache-time 24h --log-file=/home/plex/Logs/RcloneSamEnglish.txt --poll-interval 10s --umask 002 --cache-dir=/home/plex/cache --vfs-cache-mode full --vfs-cache-max-size 50G --vfs-cache-max-age 720h --vfs-cache-poll-interval 5m --vfs-read-ahead 2G
Jan 13 01:05:54 RAFIDsLabincMediaServer systemd[1]: Starting RClone English...
Jan 13 01:07:24 RAFIDsLabincMediaServer systemd[1]: RafidrcloneEnglish.service: start operation timed out. Terminating.
Jan 13 01:07:24 RAFIDsLabincMediaServer systemd[1]: RafidrcloneEnglish.service: Failed with result 'timeout'.
Jan 13 01:07:24 RAFIDsLabincMediaServer systemd[1]: Failed to start RClone English.
Jan 13 01:11:28 RAFIDsLabincMediaServer systemd[1]: RafidrcloneEnglish.service: Got notification message from PID 644, but reception only permitted for main PID which is currently not known
Jan 13 01:11:28 RAFIDsLabincMediaServer systemd[1]: RafidrcloneEnglish.service: Got notification message from PID 644, but reception only permitted for main PID which is currently not known
Jan 13 01:16:28 RAFIDsLabincMediaServer systemd[1]: RafidrcloneEnglish.service: Got notification message from PID 644, but reception only permitted for main PID which is currently not known
Jan 13 01:21:28 RAFIDsLabincMediaServer systemd[1]: RafidrcloneEnglish.service: Got notification message from PID 644, but reception only permitted for main PID which is currently not known
The rclone config contents with secrets removed.
For Documentary Backend that's working fine in systemd:
[Documentary]
type = http
url = http://172.16.50.8/SAM-FTP/Documentary/
For English Backend that's not working fine in systemd:
[English]
type = http
url = http://172.16.50.7/SAM-FTP-2/English%20Movies/
A log from the command with the -vv
flag
Both of them produce an empty result. At first run with -vv both of them go to the background but after manually unmounting & rerun for both of them shows no log in the terminal. They are just blank but they don't go to the background.
plex@RAFIDsLabincMediaServer:~/Scripts$ rclone mount English: /home/plex/SamFTP/English --allow-other --dir-cache-time 24h --log-file=/home/plex/Logs/RcloneSamEnglish.txt --poll-interval 10s --umask 002 --cache-dir=/home/plex/cache --vfs-cache-mode full --vfs-cache-max-size 50G --vfs-cache-max-age 720h --vfs-cache-poll-interval 5m --vfs-read-ahead 2G -vv
rclone mount Documentary: /home/plex/SamFTP/WebSeries/Documentary --allow-other --dir-cache-time 24h --log-file=/home/plex/Logs/Documentary.txt --poll-interval 10s --umask 002 --cache-dir=/home/plex/cache --vfs-cache-mode full --vfs-cache-max-size 50G --vfs-cache-max-age 720h --vfs-cache-poll-interval 5m --vfs-read-ahead 2G -vv