Havng trouble with systemd config

What is the problem you are having with rclone?

Following the rclone mount docs I made a systemd file to auto mount the drive on boot however I am receiving an error

Run the command 'rclone version' and share the full output of the command.

rclone v1.67.0
- os/version: debian 12.6 (64 bit)
- os/kernel: 6.8.8-3-pve (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.4
- go/linking: static
- go/tags: none

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> Yes

Which cloud storage system are you using? (eg Google Drive)

SMB

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Note a command but here is my script

# /etc/systemd/system/mnt-data.mount
[Unit]
Description=Mount for SMB Cloud share
[Mount]
Type=rclone
What=sftp1:subdir
Where=/home/scarletdevil19/cloud
Options=allow_other,--vfs-cache-mode full,config=/home/scarletdevil19/.config/rclone/rclone.conf

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

rclone config redacted
[cloud]
type = smb
host = XXX
pass = XXX

A log from the command that you were trying to run with the -vv flag

if I manually mount it mounts properly it's the config that's giving me trouble

this is the error I receive

Failed to start rcloneshare.service: Unit rcloneshare.service has a bad unit file setting.
See system logs and 'systemctl status rcloneshare.service' for details.

output of systemctl status

Aug 09 23:39:18 Portainer systemd[1]: /etc/systemd/system/rcloneshare.service:4: Unknown section 'Mount'. Ignoring.
Aug 09 23:39:18 Portainer systemd[1]: rcloneshare.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. R>
Aug 09 23:39:18 Portainer systemd[1]: rcloneshare.service: Failed to schedule restart job: Unit rcloneshare.service h>
Aug 09 23:39:18 Portainer systemd[1]: rcloneshare.service: Failed with result 'exit-code'.

post the exact command

try

[Unit]
Description=Mount for SMB Cloud share
[Mount]
Type=rclone
What=cloud:
Where=/home/scarletdevil19/cloud
Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=full,config=/home/scarletdevil19/.config/rclone/rclone.conf

i think the filename of the unit file is not correct
https://forum.manjaro.org/t/root-tip-how-to-systemd-mount-unit-samples/1191

Thank you for this answer I forgot to change that part of the config and yes the naming scheme was incorrent.

I used your solution and got this

Operation on or unit type of home-scarletdevil19-cloud.automount not supported on this system

Which means that I need to make this container a privilaged container and that defeats me wanting to use rclone in the first place. So I suppose I'll have to give up on doing the auto mounts and will have to settle with running the command with a script every time I restart the host which isn't very often.

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