Hello Guys,
today I tried to switch from my old systemd service to the systemd mount via new rclone mount helper introduced in v.1.57.0.
First of all my setup
- Ubuntu 20.04
- rclone version v.1.57.0
- remote: crypted GDrive
my old systemd service:
[Unit]
Description = rclone crypt mount /mnt/rclone
After = network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/rclone mount GD_crypt:myFolder /mnt/rclone \
--allow-other \
--uid 997 \
--gid 997 \
--umask 002 \
--dir-perms 775 \
--file-perms 664 \
--dir-cache-time 720h \
--poll-interval 30s \
--transfers 4 \
--buffer-size 32M \
--drive-chunk-size 256M \
--drive-pacer-min-sleep 10ms \
--drive-pacer-burst 1000 \
--vfs-read-ahead 512M \
--vfs-cache-max-age 2h \
--vfs-cache-mode full \
--vfs-cache-max-size 10G \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit off \
--log-file=/var/log/rclone/mount_rclone.log \
--log-level=INFO \
--rc \
--rc-addr "0.0.0.0:5572" \
--rc-enable-metrics \
--rc-user rclone \
--rc-pass myPassw0rd \
--user-agent "GoogleDriveFS/51.0.16.0 (Windows;OSVer=10.0.22000;)"
ExecStop=/bin/fusermount -u -z /mnt/rclone
Restart=on-failure
RestartSec=20
User=root
[Install]
WantedBy=multi-user.target
I have changed this successfully to this one... and it worked!
[Unit]
Description=rclone crypt mount /mnt/rclone
Requires=systemd-networkd.service
Wants=network-online.target
After=network-online.target
[Mount]
What=GD_crypt:myFolder
Where=/mnt/rclone
Type=rclone
TimeoutSec=30
Options=defaults,nofail,args2env,config=/etc/.rclone.conf,cache-dir=/var/cache/rclone,allow-other,uid=997,gid=997,umask=002,dir-perms=775,file-perms=664,dir-cache-time=720h,poll-interval=30s,transfers=4,buffer-size=32M,drive-chunk-size=256M,drive-pacer-min-sleep=10ms,drive-pacer-burst=1000,vfs-read-ahead=512M,vfs-cache-max-age=2h,vfs-cache-mode=full,vfs-cache-max-size=10G,vfs-read-chunk-size=128M,vfs-read-chunk-size-limit=off,log-file=/var/log/rclone/mount_rclone.log,log-level=INFO
[Install]
WantedBy=multi-user.target
My Problem is, that when I add rc
or even rc,rc-enable-metrics
(I need this for monitoring), the mount fails.
● mnt-rclone.mount - rclone crypt mount /mnt/rclone
Loaded: loaded (/etc/systemd/system/mnt-rclone.mount; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Tue 2021-11-02 00:53:17 CET; 908ms ago
Where: /mnt/rclone
What: GD_crypt:myFolder
Tasks: 0 (limit: 2286)
Memory: 748.0K
CGroup: /system.slice/mnt-rclone.mount
Nov 02 00:52:47 NAV systemd[1]: Mounting rclone crypt mount /mnt/rclone...
Nov 02 00:53:17 NAV systemd[1]: mnt-rclone.mount: Mounting timed out. Terminating.
Nov 02 00:53:17 NAV systemd[1]: mnt-rclone.mount: Mount process exited, code=killed, status=15/TERM
Nov 02 00:53:17 NAV systemd[1]: mnt-rclone.mount: Failed with result 'timeout'.
Nov 02 00:53:17 NAV systemd[1]: Failed to mount rclone crypt mount /mnt/rclone.
Log:
2021/11/02 01:30:43 INFO : Using --user rclone --pass XXXX as authenticated user
2021/11/02 01:30:43 NOTICE: Serving remote control on http://localhost:5572/
2021/11/02 01:30:44 INFO : Using --user rclone --pass XXXX as authenticated user
2021/11/02 01:30:44 Failed to start remote control: start server failed: listen tcp 127.0.0.1:5572: bind: address already in use
2021/11/02 01:31:13 INFO : Signal received: terminated
2021/11/02 01:31:13 INFO : Exiting...
Thanks in advance for your help!
P.S. would be nice when you give me some advices for my new systemd mount
edit: I think I found it on github