Systemd mount works but automount does not

What is the problem you are having with rclone?

I made .mount and .automount files based on the documentation for rclone mount. I am able to mount the drive correctly by starting the .mount file using systemctl. But if I try to trigger the .automount by accessing the folder, I get an error.

Weirdly, this used to work a while ago. I regularly update my system and found the breakage only now, so I don't know whether an rclone update caused it or an OS update, or something else I changed.

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

rclone v1.64.0
- os/version: arch (64 bit)
- os/kernel: 6.5.6-arch2-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.1
- go/linking: dynamic
- go/tags: none

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

Google Drive (same issue with OneDrive Business)

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

ls /mnt/Google

to trigger /etc/systemd/system/mnt-Google.automount:

[Unit]
Description=Automount Google Drive at /mnt/Google
[Automount]
Where=/mnt/Google
TimeoutIdleSec=600
[Install]
WantedBy=default.target

which in turn should call /etc/systemd/system/mnt-Google.mount:

[Unit]
Description=Mount Google Drive at /mnt/Google
[Mount]
Type=rclone
What=GoogleDrive:
Where=/mnt/Google
Options=rw,_netdev,allow_other,args2env,config=/etc/rclone/rclone.conf,cache-dir=/var/cache/rclone

The rclone config contents with secrets removed.

[GoogleDrive]
type = drive
scope = drive
token = {"access_token":"REDACTED","token_type":"Bearer","refresh_token":"REDACTED","expiry":"2023-10-11T18:26:20.45650324+01:00"}
root_folder_id = REDACTED

A log from the command with the -vv flag

If I add ,vv to the mount options, I get in the .mount systemd log

Oct 11 17:33:27 REDACTED systemd[1]: Mounting Mount Google Drive at /mnt/Google...
Oct 11 17:33:28 REDACTED mount[69529]: DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/mount.rclone" "mount" "GoogleDrive:" "/mnt/Google" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--verbose=2" "--daemon"]
Oct 11 17:33:28 REDACTED mount[69529]: DEBUG : rclone: systemd logging support activated
Oct 11 17:33:28 REDACTED mount[69529]: DEBUG : Using fallback PATH to run fusermount
Oct 11 17:33:28 REDACTED mount[69529]: DEBUG : Creating backend with remote "GoogleDrive:"
Oct 11 17:33:28 REDACTED mount[69529]: DEBUG : Using config file from "/etc/rclone/rclone.conf"
Oct 11 17:34:28 REDACTED mount[69529]: DEBUG : Daemon timed out. Terminating daemon pid 69540
Oct 11 17:34:28 REDACTED mount[69529]: Fatal error: mount not ready: /mnt/Google
Oct 11 17:34:28 REDACTED systemd[1]: mnt-Google.mount: Mount process exited, code=exited, status=1/FAILURE
Oct 11 17:34:28 REDACTED systemd[1]: Mounted Mount Google Drive at /mnt/Google.

If instead, I start the .mount unit manually then it works and I get the log

Oct 11 17:38:00 REDACTED systemd[1]: Mounting Mount Google Drive at /mnt/Google...
Oct 11 17:38:00 REDACTED mount[76618]: DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/mount.rclone" "mount" "GoogleDrive:" "/mnt/Google" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--verbose=2" "--daemon"]
Oct 11 17:38:00 REDACTED mount[76618]: DEBUG : rclone: systemd logging support activated
Oct 11 17:38:00 REDACTED mount[76618]: DEBUG : Using fallback PATH to run fusermount
Oct 11 17:38:00 REDACTED mount[76618]: DEBUG : Creating backend with remote "GoogleDrive:"
Oct 11 17:38:00 REDACTED mount[76618]: DEBUG : Using config file from "/etc/rclone/rclone.conf"
Oct 11 17:38:00 REDACTED mount[76618]: DEBUG : rclone: Version "v1.64.0" finishing with parameters ["/usr/bin/rclone" "mount" "GoogleDrive:" "/mnt/Google" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--verbose=2" "--daemon"]
Oct 11 17:38:00 REDACTED systemd[1]: Mounted Mount Google Drive at /mnt/Google.

The log is identical until the timeout, so I really don't know what is going on.

Is there a reason to not just use a service file?

You'd want to turn on debug and capture the --log-file for the mount as daemon spawns a new process off in the background and you can't see why it failed.

daemon is generally problematic as well as there are a number of issues with it.

Is there a reason to not just use a service file?

I just followed the instructions in the documentation. Would a service file be better? I liked that automount mounts and unmounts the directory on demand via access and timeouts instead of explicit mount and umount commands, would the service file do the same?

You'd want to turn on debug and capture the --log-file for the mount as daemon spawns a new process off in the background and you can't see why it failed.

Is the ,vv in the .mount file enough for the debug, or should I set up something else? WIll try the log-file option and see if that brings up anything extra, thank you.

Try setting this to 0 which stops rclone waiting for the daemon to come up. I don't know exactly what is going on here but it would be interesting to try that and see if it works as that is where it is getting stuck.

  --daemon-wait Duration                   Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)

You'll do that by putting daemon-wait=0 in your Options I think.

1 Like

Better is a bit relative. I find it better/easier in my experience. I'd don't want to speak for anyone else.

No, but a remote mount, I'm not sure I'd want to unmount and remount as you lose cache and stuff and it's generally a lot slower on start as it has to read things.

If your requirement is automount, we'd have to add the logging and test.

At a different computer, so I tried with a different smb mount showing same issues.

First, with '--log-file' as suggested by @Animosity022

2023/10/12 13:03:25 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/mount.rclone" "mount" "HPC:REDACTED" "/mnt/HPC" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--verbose=9" "--log-file=/tmp/HPC.log" "--daemon"]
2023/10/12 13:03:25 DEBUG : Using fallback PATH to run fusermount
2023/10/12 13:03:25 DEBUG : Creating backend with remote "HPC:REDACTED"
2023/10/12 13:03:25 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 13:03:25 DEBUG : smb://REDACTED: Using root directory "REDACTED"
2023/10/12 13:03:25 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/rclone" "mount" "HPC:REDACTED" "/mnt/HPC"]
2023/10/12 13:03:25 DEBUG : Creating backend with remote "HPC:REDACTED"
2023/10/12 13:03:25 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 13:03:27 DEBUG : smb://REDACTED: Using root directory "rds/user/rthottun/home"
2023/10/12 13:03:27 INFO  : smb://REDACTED: poll-interval is not supported by this remote
2023/10/12 13:03:27 DEBUG : smb://REDACTED: Mounting on "/mnt/HPC"
2023/10/12 13:03:27 DEBUG : : Root: 
2023/10/12 13:03:27 DEBUG : : >Root: node=/, err=<nil>
2023/10/12 13:04:25 DEBUG : smb://REDACTED: Closing 1 unused connections
2023/10/12 13:04:25 DEBUG : Daemon timed out. Terminating daemon pid 401530
2023/10/12 13:04:25 Fatal error: mount not ready: /mnt/HPC
2023/10/12 13:04:25 INFO  : Signal received: interrupt
2023/10/12 13:04:25 DEBUG : /mnt/HPC: Unmounted externally. Just exit now.
2023/10/12 13:04:25 INFO  : Exiting...

If I add --daemon-wait as suggested by @ncw, then I get the error

ls: cannot open directory '/mnt/HPC': No such device

but the mount actually works. I can use ls again and see the files and so on.

The log file then shows

# When I tried ls the first time

2023/10/12 13:24:25 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/mount.rclone" "mount" "HPC:REDACTED" "/mnt/HPC" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--verbose=9" "--log-file=/tmp/HPC.log" "--daemon-wait=0" "--daemon"]
2023/10/12 13:24:25 DEBUG : Using fallback PATH to run fusermount
2023/10/12 13:24:25 DEBUG : Creating backend with remote "HPC:REDACTED"
2023/10/12 13:24:25 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 13:24:25 DEBUG : smb://REDACTED: Using root directory "REDACTED"
2023/10/12 13:24:25 DEBUG : rclone: Version "v1.64.0" finishing with parameters ["/usr/bin/rclone" "mount" "HPC:REDACTED" "/mnt/HPC" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--verbose=9" "--log-file=/tmp/HPC.log" "--daemon-wait=0" "--daemon"]
2023/10/12 13:24:25 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/rclone" "mount" "HPC:REDACTED" "/mnt/HPC"]
2023/10/12 13:24:25 DEBUG : Creating backend with remote "HPC:REDACTED"
2023/10/12 13:24:25 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 13:24:27 DEBUG : smb://REDACTED: Using root directory "REDACTED"
2023/10/12 13:24:27 INFO  : smb://REDACTED: poll-interval is not supported by this remote
2023/10/12 13:24:27 DEBUG : smb://REDACTED: Mounting on "/mnt/HPC"
2023/10/12 13:24:27 DEBUG : : Root: 
2023/10/12 13:24:27 DEBUG : : >Root: node=/, err=<nil>

# After I tried ls again

2023/10/12 13:24:39 DEBUG : /: Attr: 
2023/10/12 13:24:39 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/10/12 13:24:39 DEBUG : /: ReadDirAll: 
2023/10/12 13:24:39 DEBUG : /: >ReadDirAll: item=16, err=<nil>
2023/10/12 13:24:39 DEBUG : /: Lookup: name="REDACTED"
2023/10/12 13:24:39 DEBUG : /: >Lookup: node=REDACTED, err=<nil>
2023/10/12 13:24:39 DEBUG : REDACTED: Attr: 
2023/10/12 13:24:39 DEBUG : REDACTED: >Attr: a=valid=1s ino=0 size=394 mode=-rw-r--r--, err=<nil>
2023/10/12 13:24:39 DEBUG : /: Lookup: name="REDACTED"
2023/10/12 13:24:39 DEBUG : /: >Lookup: node=REDACTED/, err=<nil>
2023/10/12 13:24:39 DEBUG : REDACTED/: Attr: 
2023/10/12 13:24:39 DEBUG : REDACTED/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/10/12 13:24:39 DEBUG : /: Lookup: name="REDACTED"
2023/10/12 13:24:39 DEBUG : /: >Lookup: node=REDACTED/, err=<nil>
2023/10/12 13:24:39 DEBUG : REDACTED/: Attr: 
2023/10/12 13:24:39 DEBUG : REDACTED/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/10/12 13:24:39 DEBUG : /: Lookup: name="REDACTED"
2023/10/12 13:24:39 DEBUG : /: >Lookup: node=REDACTED/, err=<nil>
2023/10/12 13:24:39 DEBUG : REDACTED/: Attr: 
2023/10/12 13:24:39 DEBUG : REDACTED/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/10/12 13:24:39 DEBUG : /: Lookup: name="REDACTED"
2023/10/12 13:24:39 DEBUG : /: >Lookup: node=REDACTED/, err=<nil>
2023/10/12 13:24:39 DEBUG : REDACTED/: Attr: 
2023/10/12 13:24:39 DEBUG : REDACTED/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/10/12 13:24:39 DEBUG : /: Lookup: name="REDACTED"
2023/10/12 13:24:39 DEBUG : /: >Lookup: node=REDACTED/, err=<nil>
2023/10/12 13:24:39 DEBUG : REDACTED/: Attr: 
2023/10/12 13:24:39 DEBUG : REDACTED/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>

# After I stopped the systemd unit

2023/10/12 13:25:00 DEBUG : /mnt/HPC: Unmounted externally. Just exit now.
2023/10/12 13:25:00 DEBUG : rclone: Version "v1.64.0" finishing with parameters ["/usr/bin/rclone" "mount" "HPC:REDACTED" "/mnt/HPC"]

Uhm, that seems to be a different mount all together and not the google drive in your config? Can you share your rclone.conf and any updated commands you are running? I'm not sure what we are debugging now.

Sorry, as I mentioned, I am on a different computer so I shared a different drive showing the same issue. The config is now

[HPC]
type = smb
host = REDACTED
user = REDACTED
pass = REDACTED
domain = REDACTED

The systemd files are identical, with the additional changes for logging and waiting I added based on the replies.

I can't tell what you are removing out as the debug looks odd.

The version starts usually match up.

2023/10/12 08:52:43 DEBUG : rclone: Version "v1.64.0" starting with parameters ["rclone" "mount" "DB:" "/home/felix/test" "-vv" "--daemon" "--log-file" "blah.log"]
2023/10/12 08:52:43 DEBUG : Creating backend with remote "DB:"
2023/10/12 08:52:43 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2023/10/12 08:52:43 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/rclone" "mount" "DB:" "/home/felix/test" "-vv" "--daemon" "--log-file" "blah.log"]
2023/10/12 08:52:43 DEBUG : Creating backend with remote "DB:"
2023/10/12 08:52:43 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2023/10/12 08:52:43 DEBUG : DB: Loaded invalid token from config file - ignoring
2023/10/12 08:52:43 DEBUG : Saving config "token" in section "DB" of the config file
2023/10/12 08:52:43 DEBUG : Keeping previous permissions for config file: -rwxrwxr-x
2023/10/12 08:52:43 DEBUG : DB: Saved new token in config file
2023/10/12 08:52:44 DEBUG : Dropbox root '': Mounting on "/home/felix/test"
2023/10/12 08:52:44 DEBUG : : Root:
2023/10/12 08:52:44 DEBUG : : >Root: node=/, err=<nil>
2023/10/12 08:52:44 DEBUG : rclone: Version "v1.64.0" finishing with parameters ["/usr/bin/rclone" "mount" "DB:" "/home/felix/test" "-vv" "--daemon" "--log-file" "blah.log"]
2023/10/12 08:52:44 INFO  : Dropbox root '': Committing uploads - please wait...
2023/10/12 08:52:52 DEBUG : /: Attr:
2023/10/12 08:52:52 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/10/12 08:52:52 DEBUG : /: ReadDirAll:

and

How can they identical as they are different remotes / different mount points ?

That is the underlying cause of the problem. I'm not sure what would give a No such device error though.

Is there a failed mount on /mnt/HPC ? Check /proc/mounts .

Is systemd doing some kind of security stuff which is blocking rclone reading that directory or maybe blocking rclone reading /proc?

I can't tell what you are removing out as the debug looks odd.

I didn't remove anything except usernames, passwords, addresses and foldernames all of which I replaced with REDACTED

How can they identical as they are different remotes / different mount points ?

I meant they are identical except for the obvious change in the remote and mount names.


So that there is no more confusion, let me show the results for the original /mnt/Google drive.

First, with the options

Options=rw,_netdev,allow_other,args2env,config=/etc/rclone/rclone.conf,cache-dir=/var/cache/rclone,log-file=/tmp/Google,verbose=9

Contents of /tmp/Google:

2023/10/12 21:49:26 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/mount.rclone" "mount" "GoogleDrive:" "/mnt/Google" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--log-file=/tmp/Google" "--verbose=9" "--daemon"]
2023/10/12 21:49:26 DEBUG : Using fallback PATH to run fusermount
2023/10/12 21:49:26 DEBUG : Creating backend with remote "GoogleDrive:"
2023/10/12 21:49:26 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 21:49:26 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/rclone" "mount" "GoogleDrive:" "/mnt/Google"]
2023/10/12 21:49:26 DEBUG : Creating backend with remote "GoogleDrive:"
2023/10/12 21:49:26 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 21:49:27 DEBUG : Google drive root '': Mounting on "/mnt/Google"
2023/10/12 21:49:27 DEBUG : : Root: 
2023/10/12 21:49:27 DEBUG : : >Root: node=/, err=<nil>
2023/10/12 21:50:26 DEBUG : Daemon timed out. Terminating daemon pid 229906
2023/10/12 21:50:26 Fatal error: mount not ready: /mnt/Google
2023/10/12 21:50:26 INFO  : Signal received: interrupt
2023/10/12 21:50:26 DEBUG : /mnt/Google: Unmounted externally. Just exit now.
2023/10/12 21:50:26 INFO  : Exiting...

If I add the daemon-wait option:

Options=rw,_netdev,allow_other,args2env,config=/etc/rclone/rclone.conf,cache-dir=/var/cache/rclone,log-file=/tmp/Google,verbose=9,daemon-wait=0

Contents of /tmp/Google:

2023/10/12 21:57:16 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/mount.rclone" "mount" "GoogleDrive:" "/mnt/Google" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--log-file=/tmp/Google" "--verbose=9" "--daemon-wait=0" "--daemon"]
2023/10/12 21:57:16 DEBUG : Using fallback PATH to run fusermount
2023/10/12 21:57:16 DEBUG : Creating backend with remote "GoogleDrive:"
2023/10/12 21:57:16 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 21:57:16 DEBUG : rclone: Version "v1.64.0" finishing with parameters ["/usr/bin/rclone" "mount" "GoogleDrive:" "/mnt/Google" "--allow-other" "--config=/etc/rclone/rclone.conf" "--cache-dir=/var/cache/rclone" "--log-file=/tmp/Google" "--verbose=9" "--daemon-wait=0" "--daemon"]
2023/10/12 21:57:16 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/rclone" "mount" "GoogleDrive:" "/mnt/Google"]
2023/10/12 21:57:16 DEBUG : Creating backend with remote "GoogleDrive:"
2023/10/12 21:57:16 DEBUG : Using config file from "/etc/rclone/rclone.conf"
2023/10/12 21:57:17 DEBUG : Google drive root '': Mounting on "/mnt/Google"
2023/10/12 21:57:17 DEBUG : : Root: 
2023/10/12 21:57:17 DEBUG : : >Root: node=/, err=<nil>
2023/10/12 21:58:17 DEBUG : Google drive root '': Checking for changes on remote

I have not redacted anything, this is the entire file

Is there a failed mount on /mnt/HPC ? Check /proc/mounts

No, I checked the output of the mount command and /proc/mounts. Both do not have the drive listed.

Is systemd doing some kind of security stuff which is blocking rclone reading that directory or maybe blocking rclone reading /proc?

Unlikely. Because when I set the daemon wait to 0, even though it says No such device, it is mounting the drive correctly. I see it in /proc/mounts, can access the files and so on. To summarise the issue:

  • When I don't have daemon-wait=0, the daemon times out after a minute and the files are not accessible (but /proc/mounts shows the drive as mounted)
  • If I add daemon-wait=0, I get a No such device message but the mount works correctly (files accessible, /proc/mounts shows the entry)

For now, I can set daemon-wait=0 and get things to work. Thank you for helping me with that. But it would be more satisfying to find the source of the issue and fix it so that the (at least misleading) No such device message is gone too.

What's the output from journalctl -u whateveryourmountnameis.mount -b

1 Like

What's the output from journalctl -u whateveryourmountnameis.mount -b

For the failure case shared above (without daemon-wait). REDACTED is the hostname.

Oct 12 21:49:26 REDACTED systemd[1]: Mounting Mount Google Drive at /mnt/Google...
Oct 12 21:50:26 REDACTED systemd[1]: mnt-Google.mount: Mount process exited, code=exited, status=1/FAILURE
Oct 12 21:50:26 REDACTED systemd[1]: Mounted Mount Google Drive at /mnt/Google.

For the "success" case (with daemon-wait)

Oct 12 21:57:16 REDACTED systemd[1]: Mounting Mount Google Drive at /mnt/Google...
Oct 12 21:57:16 REDACTED systemd[1]: mnt-Google.mount: Mount process finished, but there is no mount.
Oct 12 21:57:16 REDACTED systemd[1]: mnt-Google.mount: Failed with result 'protocol'.
Oct 12 21:57:16 REDACTED systemd[1]: mnt-Google.mount: Unit process 242226 (rclone) remains running after unit stopped.
Oct 12 21:57:16 REDACTED systemd[1]: Failed to mount Mount Google Drive at /mnt/Google.

Hmm, I was trying to test out and mine was a bit different. I'll have some time to play around with it tomorrow.

Oct 12 17:27:01 gemini systemd[1]: Mounting test.mount - DB /test mount...
Oct 12 17:27:01 gemini mount[195778]: mount: /test: unknown filesystem type 'rclone'.
Oct 12 17:27:01 gemini mount[195778]:        dmesg(1) may have more information after failed mount system call.

You perhaps don't have the mount helper symlinks? From the docs:

The core Unix program /bin/mount normally takes the -t FSTYPE argument then runs the /sbin/mount.FSTYPE helper program passing it mount options as -o key=val,... or --opt=.... Automount (classic or systemd) behaves in a similar way.

rclone by default expects GNU-style flags --key val. To run it as a mount helper you should symlink rclone binary to /sbin/mount.rclone and optionally /usr/bin/rclonefs, e.g. ln -s /usr/bin/rclone /sbin/mount.rclone. rclone will detect it and translate command-line arguments appropriately.

It is good to know the drive is correctly mounted at that point.

I am confused though, you said

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


First a bit of background... When you use --daemon rclone runs another copy of itself detached from the initial execution. This is so it can run in the background with no interference. However the initial rclone checks to see whether the daemon rclone has started up properly and returns error messages if not.

That check is failing for some reason. Setting daemon_wait tells the initial rclone not to wait for the daemon to come good.

From looking at the code it looks like rclone is having trouble finding the mounted drive in /proc/self/mountinfo. Can you start the rclone mount with daemon_wait=0, get it running then find it's PID and then paste the contents of /proc/PID/mountinfo - I conjecture there is a problem here. We use an external library for this Releases · moby/sys · GitHub - the mountinfo package.

Thank you.

I did, but it was late and I had a typo so I retestsed this morning with it properly setup.

I can get the same timeout:

632 39 0:154 / /test rw,nosuid,nodev,relatime shared:521 - fuse.rclone DB: rw,user_id=0,group_id=0,allow_other

that's from the mountinfo so I guess it doesn't find it.

[root@gemini 60399]# cat /etc/systemd/system/test.mount
[Unit]
Description=DB /test mount
[Mount]
Type=rclone
What=DB:
Where=/test
Options=rw,_netdev,allow_other,args2env,config=/opt/rclone/rclone.conf,log-file=/tmp/rclone.log,verbose=9

[root@gemini 60399]# cat /etc/systemd/system/test.automount
[Unit]
Description=Automount Google Drive at /mnt/Google
[Automount]
Where=/test
TimeoutIdleSec=600
[Install]
WantedBy=default.target
[root@gemini 60399]#
1 Like

Seems to change from 1.63.1 to 1.64 s 1.63.1 works for me.

Same files and I just downloaded 1.63.1 and linked that to the helper.

2023/10/13 08:57:43 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/sbin/mount.rclone" "mount" "DB:" "/test" "--allow-other" "--config=/opt/rclone/rclone.conf" "--log-file=/tmp/rclone.log" "--verbose=9" "--daemon"]
2023/10/13 08:57:43 DEBUG : Using fallback PATH to run fusermount
2023/10/13 08:57:43 DEBUG : Creating backend with remote "DB:"
2023/10/13 08:57:43 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2023/10/13 08:57:43 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/rclone" "mount" "DB:" "/test"]
...skipping...
2023/10/13 08:57:43 DEBUG : Using fallback PATH to run fusermount
2023/10/13 08:57:43 DEBUG : Creating backend with remote "DB:"
2023/10/13 08:57:43 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2023/10/13 08:57:43 DEBUG : rclone: Version "v1.64.0" starting with parameters ["/usr/bin/rclone" "mount" "DB:" "/test"]
2023/10/13 08:57:43 DEBUG : Creating backend with remote "DB:"
2023/10/13 08:57:43 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2023/10/13 08:57:43 DEBUG : Dropbox root '': Mounting on "/test"
2023/10/13 08:57:43 DEBUG : : Root:
2023/10/13 08:57:43 DEBUG : : >Root: node=/, err=<nil>
2023/10/13 08:58:43 DEBUG : Daemon timed out. Terminating daemon pid 60399
2023/10/13 08:58:43 Fatal error: mount not ready: /test
2023/10/13 08:58:43 INFO  : Signal received: interrupt
2023/10/13 08:58:43 INFO  : Dropbox root '': Committing uploads - please wait...
2023/10/13 08:58:43 DEBUG : /test: Unmounted externally. Just exit now.
2023/10/13 08:58:43 INFO  : Exiting...
2023/10/13 09:02:53 DEBUG : rclone: Version "v1.63.1" starting with parameters ["/sbin/mount.rclone" "mount" "DB:" "/test" "--allow-other" "--config=/opt/rclone/rclone.conf" "--log-file=/tmp/rclone.log" "--verbose=9" "--daemon"]
2023/10/13 09:02:53 DEBUG : Using fallback PATH to run fusermount
2023/10/13 09:02:53 DEBUG : Creating backend with remote "DB:"
2023/10/13 09:02:53 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2023/10/13 09:02:53 DEBUG : rclone: Version "v1.63.1" starting with parameters ["/root/rclone-v1.63.1-linux-amd64/rclone" "mount" "DB:" "/test"]
2023/10/13 09:02:53 DEBUG : Creating backend with remote "DB:"
2023/10/13 09:02:53 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2023/10/13 09:02:53 DEBUG : Dropbox root '': Mounting on "/test"
2023/10/13 09:02:53 DEBUG : : Root:
2023/10/13 09:02:53 DEBUG : : >Root: node=/, err=<nil>
2023/10/13 09:02:53 DEBUG : rclone: Version "v1.63.1" finishing with parameters ["/root/rclone-v1.63.1-linux-amd64/rclone" "mount" "DB:" "/test" "--allow-other" "--config=/opt/rclone/rclone.conf" "--log-file=/tmp/rclone.log" "--verbose=9" "--daemon"]
2023/10/13 09:02:53 INFO  : Dropbox root '': Committing uploads - please wait...
2023/10/13 09:02:53 DEBUG : /: Attr:
2023/10/13 09:02:53 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/10/13 09:02:53 DEBUG : /: ReadDirAll:

and the line from mountinfo looks the same:

632 39 0:154 / /test rw,nosuid,nodev,relatime shared:521 - fuse.rclone DB: rw,user_id=0,group_id=0,allow_other

Working above

Not working above.

1 Like

Oh, that is interesting. So it is a regression.

There is a very obvious change which most likely caused this commit bb0cd76a5f from #7149 which in turn fixed this problem

This changed the /proc/mounts parser to a better maintained one. I'm guessing there is something in the file that the new library doesn't cope with.

@darthShadow any thoughts on this?

1 Like