Command rclone mount hangs

What is the problem you are having with rclone?

Command 'rclone mount' hangs ... don't get command prompt back

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

rclone v1.61.1

  • os/version: ubuntu 22.10 (64 bit)
  • os/kernel: 5.19.0-31-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: none

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

pCloud

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

rclone mount  pcloud: /rclone-mnt/ --vfs-cache-mode full --allow-other

The rclone config contents with secrets removed.

[pcloud]
type = pcloud
hostname = eapi.pcloud.com
token = {"access_token":"XXXXXXXXXXXXXXXXXXXXXXXX","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}

A log from the command with the -vv flag

rclone mount -vv pcloud: /rclone-mnt/ --vfs-cache-mode full --allow-other 
2023/02/21 14:39:24 DEBUG : rclone: Version "v1.61.1" starting with parameters ["rclone" "mount" "-vv" "pcloud:" "/rclone-mnt/" "--vfs-cache-mode" "full" "--allow-other"]
2023/02/21 14:39:24 DEBUG : Creating backend with remote "pcloud:"
2023/02/21 14:39:24 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/02/21 14:39:24 INFO  : pcloud root '': poll-interval is not supported by this remote
2023/02/21 14:39:24 DEBUG : vfs cache: root is "/root/.cache/rclone"
2023/02/21 14:39:24 DEBUG : vfs cache: data root is "/root/.cache/rclone/vfs/pcloud"
2023/02/21 14:39:24 DEBUG : vfs cache: metadata root is "/root/.cache/rclone/vfsMeta/pcloud"
2023/02/21 14:39:24 DEBUG : Creating backend with remote "/root/.cache/rclone/vfs/pcloud/"
2023/02/21 14:39:24 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfs/pcloud/" to be canonical "/root/.cache/rclone/vfs/pcloud"
2023/02/21 14:39:24 DEBUG : Creating backend with remote "/root/.cache/rclone/vfsMeta/pcloud/"
2023/02/21 14:39:24 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfsMeta/pcloud/" to be canonical "/root/.cache/rclone/vfsMeta/pcloud"
2023/02/21 14:39:24 DEBUG : pcloud root '': Mounting on "/rclone-mnt/"
2023/02/21 14:39:24 DEBUG : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item mba.jpeg not removed, freed 0 bytes
2023/02/21 14:39:24 INFO  : vfs cache: cleaned: objects 1 (was 1) in use 0, to upload 0, uploading 0, total size 25.715Ki (was 25.715Ki)
2023/02/21 14:39:24 DEBUG : : Root: 
2023/02/21 14:39:24 DEBUG : : >Root: node=/, err=<nil>
2023/02/21 14:39:24 DEBUG : /: Lookup: name=".Trash"
2023/02/21 14:39:25 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/21 14:39:25 DEBUG : /: Lookup: name=".Trash-1000"
2023/02/21 14:39:25 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/21 14:40:24 DEBUG : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item mba.jpeg not removed, freed 0 bytes
2023/02/21 14:40:24 INFO  : vfs cache: cleaned: objects 1 (was 1) in use 0, to upload 0, uploading 0, total size 25.715Ki (was 25.715Ki)
2023/02/21 14:40:37 DEBUG : : Statfs: 
2023/02/21 14:40:37 DEBUG : /: Attr: 
2023/02/21 14:40:37 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/02/21 14:40:37 DEBUG : /: Lookup: name=".directory"
2023/02/21 14:40:37 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/21 14:40:37 DEBUG : /: Lookup: name=".Trash"
2023/02/21 14:40:37 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/21 14:40:37 DEBUG : /: Lookup: name=".Trash-1000"
2023/02/21 14:40:37 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/21 14:40:37 DEBUG : /: ReadDirAll: 
2023/02/21 14:40:37 DEBUG : /: >ReadDirAll: item=3, err=<nil>
2023/02/21 14:40:37 DEBUG : /: Lookup: name="mba.jpeg"
2023/02/21 14:40:37 DEBUG : /: >Lookup: node=mba.jpeg, err=<nil>
2023/02/21 14:40:37 DEBUG : mba.jpeg: Attr: 
2023/02/21 14:40:37 DEBUG : mba.jpeg: >Attr: a=valid=1s ino=0 size=26332 mode=-rw-r--r--, err=<nil>
2023/02/21 14:40:37 DEBUG : /: Lookup: name=".hidden"
2023/02/21 14:40:37 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2023/02/21 14:40:37 DEBUG : /: Attr: 
2023/02/21 14:40:37 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2023/02/21 14:40:37 DEBUG : mba.jpeg: Open: flags=OpenReadOnly
2023/02/21 14:40:37 DEBUG : mba.jpeg: Open: flags=O_RDONLY
2023/02/21 14:40:37 DEBUG : mba.jpeg: newRWFileHandle: 
2023/02/21 14:40:37 DEBUG : mba.jpeg: >newRWFileHandle: err=<nil>
2023/02/21 14:40:37 DEBUG : mba.jpeg: >Open: fd=mba.jpeg (rw), err=<nil>
2023/02/21 14:40:37 DEBUG : mba.jpeg: >Open: fh=&{mba.jpeg (rw)}, err=<nil>
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: Read: len=16384, offset=0
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): _readAt: size=16384, off=0
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): openPending: 
2023/02/21 14:40:37 DEBUG : : >Statfs: stat={Blocks:262144000 Bfree:262143993 Bavail:262143993 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>
2023/02/21 14:40:37 DEBUG : mba.jpeg: vfs cache: checking remote fingerprint "26332,2023-02-09 15:51:31 +0000 UTC,7f413719622b1fa8d14421ee2e10ffff0240c29b" against cached fingerprint "26332,2023-02-09 15:51:31 +0000 UTC,7f413719622b1fa8d14421ee2e10ffff0240c29b"
2023/02/21 14:40:37 DEBUG : mba.jpeg: vfs cache: truncate to size=26332 (not needed as size correct)
2023/02/21 14:40:37 DEBUG : : Added virtual directory entry vAddFile: "mba.jpeg"
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): >openPending: err=<nil>
2023/02/21 14:40:37 DEBUG : vfs cache: looking for range={Pos:0 Size:16384} in [{Pos:0 Size:26332}] - present true
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): >_readAt: n=16384, err=<nil>
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: >Read: read=16384, err=<nil>
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: Read: len=12288, offset=16384
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): _readAt: size=12288, off=16384
2023/02/21 14:40:37 DEBUG : vfs cache: looking for range={Pos:16384 Size:9948} in [{Pos:0 Size:26332}] - present true
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): >_readAt: n=9948, err=EOF
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: >Read: read=9948, err=<nil>
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: Flush: 
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): RWFileHandle.Flush
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: >Flush: err=<nil>
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: Release: 
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): RWFileHandle.Release
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): close: 
2023/02/21 14:40:37 DEBUG : mba.jpeg: vfs cache: setting modification time to 2023-02-09 15:51:31 +0000 +0000
2023/02/21 14:40:37 DEBUG : mba.jpeg(0xc000878400): >close: err=<nil>
2023/02/21 14:40:37 DEBUG : &{mba.jpeg (rw)}: >Release: err=<nil>
2023/02/21 14:41:24 DEBUG : vfs cache RemoveNotInUse (maxAge=3600000000000, emptyOnly=false): item mba.jpeg not removed, freed 0 bytes
2023/02/21 14:41:24 INFO  : vfs cache: cleaned: objects 1 (was 1) in use 0, to upload 0, uploading 0, total size 25.715Ki (was 25.715Ki)
^C2023/02/21 14:41:41 INFO  : Signal received: interrupt
2023/02/21 14:41:41 DEBUG : vfs cache: cleaner exiting
2023/02/21 14:41:41 ERROR : /rclone-mnt/: Unmounted rclone mount
2023/02/21 14:41:41 INFO  : Exiting...

That's suppose to happen as it's not a forking process.

You'd want to wrap it around a service file or something along those lines.

So the solution is:

rclone mount  pcloud: /rclone-mnt/ --vfs-cache-mode full --allow-other&

Not really, that just puts it in the background.

Example service file.

That's more for dropbox but gives you an idea.

I followed the documentation in rclone mount and made:

ln -s /usr/bin/rclone /sbin/mount.rclone

added in /etc/fstab following:

pcloud:  /pcloud rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=full,config=/root/.config/rclone/rclone.conf,cache_dir=/var/cache/rclone 0 0

I can copy/list/delete files from pcloud: at command level but I don't see the files in my file manager.

mount gives me for pcloud:

pcloud: on /pcloud type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,_netdev,x-systemd.automount)

But when I comment the line in /etc/fstab & reboot and give the command

rclone mount  pcloud: /pcloud --vfs-cache-mode full --allow-other&

then all my files in pcloud: shows up in my file manager.

mount gives me then for pcloud:

pcloud: on /pcloud type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)

So it seems that this command will mount pcloud: but the /etc/fstab option will not.
How can I modify /etc/fstab line so the same happens?

I've never used /etc/fstab as I use a service file.

Then I don't understand why the rclone mount documentation in the section Rclone as Unix mount helper says

or add in /etc/fstab a line like
sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0

Maybe I have totally misunderstood it ...

This is probably a permissions problem - the mount will run as root in /etc/fstab but you are probably accessing it as a user - try adding allow_other to the mount command line in /etc/fstab

Thanks ... it was a permissions problem.
Adding allow_other to fstab solved the problem.

1 Like

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