Mount Service does not work

Hello Guys,

a few months ago i create my gdrive(gsuite) unlimited drive. I use it with rclone browser, but when i want to use it with kodi(on a linux pc) i must run a shell script to mount it as drive. Yesterday i found a method to mount my rclone drive at startup, but it doesn’t work…

Here is the .service file i create(original from https://github.com/ajkis/scripts/tree/master/rclone):

# Rclone mount on boot ( service file template - add aditional rclone parameters )
# Copy file to: /etc/systemd/system
# Set remote name (current acdcrypt), path to mount and User,Group (current plex)
# Register new service by typing:
# sudo systemctl daemon-reload
# sudo systemctl enable rclone-mount.service
# systemctl start rclone-mount.service
# systemctl enable NetworkManager-wait-online.service
# Usage:
# To unmount drive use
# systemctl stop rclone-mount.service
# To mount use:
# systemctl start rclone-mount.service

[Unit]
Description=rclone Google
Documentation=http://rclone.org/docs/
After=network-online.target

[Service]
Type=simple
User=maximilian
Group=sudo
ExecStart=/usr/bin/rclone mount --allow-non-empty --allow-other cryptmedia:/ /home/maximilian/Mount/cryptmedia/cryptmedia/
ExecStop=/usr/bin/fusermount -uz /home/maximilian/Mount/cryptmedia/

[Install]
WantedBy=multi-users.target

I copied the rclone-mount.service with sudo cp /home/maximilian/scrips/rclone-mount.service /etc/systemd/system/

And the i do the things in the description. But i have no Drive at Reboot…

Sorry for my english, iam from germay

As root:

systemctl enable rclone-mount.service

and that will enable it at startup.

I use sudo su and type the command but after a restart nothing happend

Does it work manually if you start it?

systemctl start rclone-mount.service

and check the status for any errors.

systemctl status rclone-mount.service

It doesent start manually …

This is the Status output:
rclone-mount.service - rclone Google
Loaded: loaded (/etc/systemd/system/rclone-mount.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-04-27 18:03:21 CEST; 1min 6s ago
Docs: http://rclone.org/docs/
Main PID: 2238 (code=exited, status=1/FAILURE)

Apr 27 18:03:20 maximilian-LIFEBOOK-AH531 systemd[1]: Started rclone Google.
Apr 27 18:03:21 maximilian-LIFEBOOK-AH531 rclone[2238]: 2018/04/27 18:03:21 mount helper error: fusermount: option allow_other only allowed
Apr 27 18:03:21 maximilian-LIFEBOOK-AH531 rclone[2238]: 2018/04/27 18:03:21 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
Apr 27 18:03:21 maximilian-LIFEBOOK-AH531 systemd[1]: rclone-mount.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 18:03:21 maximilian-LIFEBOOK-AH531 systemd[1]: rclone-mount.service: Failed with result ‘exit-code’.

Try to run it manually by using the command you have configured in your ExecStart:

/usr/bin/rclone mount --allow-non-empty --allow-other cryptmedia:/ /home/maximilian/Mount/cryptmedia/cryptmedia/

I personally hate having allow-non-empty as it allows you to overmount things which is generally bad and confusing.

Does your mount folder exist?

You may want to add the following after the line Group=sudo in your systemd service file :

ExecStartPre=/bin/mkdir -p /home/maximilian/Mount/cryptmedia/cryptmedia/

then reload daemon

sudo systemctl daemon-reload

or do you have your rclone in /usr/sbin instead of /usr/bin? :slight_smile:

Try to type “which rclone” without the "