Rclone mount stops working every few days - Plex

My config file is as:

[Unit]
Description=Google Drive (rclone)
AssertPathIsDirectory=/var/lib/plexmediaserver/video
After=googledrive.service

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount google: /var/lib/plexmediaserver/video --allow-non-empty  \
--allow-other  \
--buffer-size 1G \
--dir-cache-time 6h \
--drive-chunk-size 256M \
--log-level INFO \
--log-file /var/log/rclone.log \
--timeout 1h \
--umask 002 \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit off
ExecStop=/bin/fusermount -uz /var/lib/plexmediaserver/video
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

Error log contains:

2020/06/05 14:26:07 Fatal error: failed to umount FUSE fs: exit status 1: fusermount: failed to unmount /var/lib/plexmediaserver/video: Device or resource busy

It will not let me restart the service but if I manually run /bin/fusermount -uz /var/lib/plexmediaserver/video it will.

What is the cause of this?

That should be:

Type=notify

That probably causes your issue as systemd kill notices it stops and restarts it by killing rclone.

You want

Restart=on-failure

and kill mode should be none.

KillMode=none

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