Systemd mount works but automount does not

Here is a full set of commands that I ran, along with their outputs (everything unrelated to rclone has been removed)

❯ ls /mnt/Google/
ls: cannot access '/mnt/Google/': No such device

❯ ls /mnt/Google/
 Archived   Books   Creativity  Data   Documents   gdrive.exclude

❯ ps aux | grep rclone
root      830319  0.5  0.4 2195656 73704 ?       Sl   14:51   0:00 /usr/bin/rclone mount GoogleDrive: /mnt/Google

❯ cat /proc/830319/mountinfo
379 27 0:70 / /mnt/Google rw,relatime shared:433 - autofs systemd-1 rw,fd=57,pgrp=1,timeout=600,minproto=5,maxproto=5,direct,pipe_ino=768063
566 379 0:90 / /mnt/Google rw,nosuid,nodev,relatime shared:488 - fuse.rclone GoogleDrive: rw,user_id=0,group_id=0,allow_other

To answer your question,

What gives that error? That isn't an error from rclone. Where is it from?

It is the error that ls returns the first time, when I use it to trigger automount.

It seems like an issue with the multi-process model since it's using the /proc/self/mountinfo file now rather than the global /proc/mounts but I am not sure exactly where it's breaking because of this... :thinking:

1 Like

I think I see the problem. In the /proc/self/mountinfo file there are two lines with /mnt/Google in.

Rclone will be finding the first and not seeing that there is a mount of type rclone so concluding that the mount isn't ready.

This is easy to fix - please give this a go @razimantv

v1.65.0-beta.7431.52de6d175.fix-automount on branch fix-automount (uploaded in 15-30 mins)

2 Likes

Thank you. I confirm that by taking the following steps:

  • Replace /usr/bin/rclone by the version in the zip
  • Remove daemon-wait=0 from the systemd .mount file
  • systemctl daemon-reload
  • Run ls on the mount point

The drive mounts correctly the first time itself.

@razimantv @ncw thank you for tracking this down. I was having the exact same issue with automount and couldn't figure it out. But reading through this thread 100% sure this is it. Look forward to the 1.65 fix. Degbug logs, scenario, and remote were basically the same.

1 Like

Thank you for testing.

I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.65 and I'll also put it in v1.64.1 which is due out very soon.

2 Likes

Fix worked. Thx!

1 Like

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