Error traversing cache and orphan mountpoint

What is the problem you are having with rclone?

I have a mounted Google Drive unit with ~500 GiB of files, which are between 16KiB and 4 MiB in size.

Recently I'm seeing how RClone closes unexpectedly, leaving the FUSE mount orphan and not being able to restart itself (it's a Systemd service) because the mountpoint is not available.

As I'm using the mounted unit as a Docker volume, when I got it to be restarted (adding a unmount command before trying to invoke rclone) it doesnt fix the issue, as the Docker is still connected to the old mount, giving transport endpoint is not connected

Is there anything i can do to avoid this issue? Is it a bug?

What is your rclone version (output from rclone version)

rclone v1.52.2
- os/arch: linux/amd64
- go version: go1.14.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 20.04

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

Google Drive

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

The service I'm running is this:

[Unit]
Description=Rclone mount remote
After=network-online.target
Before=docker.service

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount data: /mnt/drive_unit \
   --allow-non-empty \
   --buffer-size 512M \
   --dir-cache-time 48h \
   --fast-list \
   --drive-use-trash=false \
   --use-mmap \
   --rc \
   --no-modtime \
   --write-back-cache  \
   --vfs-cache-max-size 5G \
   --vfs-cache-mode writes \
   --vfs-read-chunk-size 64M \
   --vfs-cache-poll-interval 2m0s \
   --vfs-read-chunk-size-limit 256M \
   --vfs-write-wait 2s \
   --low-level-retries 256 \
   --tpslimit 12 \
   --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"
ExecStop=/bin/fusermount -uz /mnt/drive_unit
Restart=on-failure
User=root

[Install]
WantedBy=default.target

The rclone config contents with secrets removed.

[data]
type = drive
client_id = REMOVED
client_secret = REMOVED
scope = drive
root_folder_id = REMOVED
token = {"access_token":"REMOVED","token_type":"Bearer","refresh_token":"REMOVED","expiry":"2020-06-28T18:13:24.205047347Z"}

A log from the command with the -vv flag

Not exactly with -vv flag, but when it crashes it says that:

Jun 28 15:43:31 rclone[668]: 2020/06/28 15:43:31 ERROR : Error traversing cache "/root/.cache/rclone/vfs/data/001": lstat /root/.cache/rclone/vfs/data/001/storage/temp/blob-314419498.partial: no such file or directory
Jun 28 15:47:22 rclone[668]: 2020/06/28 15:47:22 ERROR : Error traversing cache "/root/.cache/rclone/vfs/data/001": lstat /root/.cache/rclone/vfs/data/001/storage/temp/blob-910340971.partial: no such file or directory
Jun 28 16:01:22 systemd[1]: rclone-mount.service: Main process exited, code=killed, status=9/KILL
Jun 28 16:01:22 systemd[1]: rclone-mount.service: Failed with result 'signal'.
Jun 28 16:01:22 systemd[1]: rclone-mount.service: Scheduled restart job, restart counter is at 1.
Jun 28 16:01:22 systemd[1]: Stopped Rclone mount remote.

And when the services tries to auto-restart:

Jun 28 17:13:24 rclone[6937]: 2020/06/28 17:13:24 NOTICE: Serving remote control on http://127.0.0.1:5572/
Jun 28 17:13:25 rclone[6937]: 2020/06/28 17:13:25 mount helper error: fusermount: failed to access mountpoint /mnt/drive_unit: Transport endpoint is not connected
Jun 28 17:13:25 rclone[6937]: 2020/06/28 17:13:25 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
Jun 28 17:13:25 systemd[1]: rclone-mount.service: Main process exited, code=exited, status=1/FAILURE
Jun 28 17:13:25 systemd[1]: rclone-mount.service: Failed with result 'exit-code'.
Jun 28 17:13:26 systemd[1]: rclone-mount.service: Scheduled restart job, restart counter is at 2.
Jun 28 17:13:26 systemd[1]: Stopped Rclone mount remote.```

It becomes bad, because it's killed by systemd. You want to change that to KillMode=None

[Service]
Type=notify
KillMode=none

and you want to change simple to notify.

I've just found that it was OOMKilled.

My bad, it was a silly issue.

I´m going to decrease the buffer size and monitor it better :smile:

Thanks and sorry for the mess!

Ah, that makes sense too.

You should make those systemd changes though to prevent any other issues.

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