Fatal error: failed to mount FUSE fs: cannot read /proc/mounts: expected integer

What is the problem you are having with rclone?

rclone mount does not work under linux

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

rclone v1.63.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.15.90.1-microsoft-standard-WSL2 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.5
  • go/linking: static
  • go/tags: none

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

sftp

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

 rclone mount --vfs-cache-mode writes blob:/ /mnt/blob

The rclone config contents with secrets removed.

[blob]
type = sftp
host = XXXX
user = YYYY
pass = ZZZZ
disable_hashcheck = true
shell_type = shellTypeNotSupported

A log from the command with the -vv flag

2023/07/17 14:40:58 DEBUG : rclone: Version "v1.63.0" starting with parameters ["rclone" "-vv" "mount" "--vfs-cache-mode" "writes" "blob:/" "/mnt/blob"]
2023/07/17 14:40:58 DEBUG : Creating backend with remote "blob:/"
2023/07/17 14:40:58 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/07/17 14:40:59 DEBUG : sftp://URL:22//: New connection 1.1.1.1:48050->2.2.2.2:22 to "SSH-2.0-AzureSSH_1.0.0"
2023/07/17 14:40:59 DEBUG : sftp://URL:22//: Shell type "shellTypeNotSupported" from config
2023/07/17 14:40:59 DEBUG : sftp://URL:22//: Using root directory "/"
2023/07/17 14:40:59 INFO  : sftp://URL:22//: poll-interval is not supported by this remote
2023/07/17 14:40:59 DEBUG : vfs cache: root is "/root/.cache/rclone"
2023/07/17 14:40:59 DEBUG : vfs cache: data root is "/root/.cache/rclone/vfs/blob"
2023/07/17 14:40:59 DEBUG : vfs cache: metadata root is "/root/.cache/rclone/vfsMeta/blob"
2023/07/17 14:40:59 DEBUG : Creating backend with remote "/root/.cache/rclone/vfs/blob//"
2023/07/17 14:40:59 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfs/blob//" to be canonical "/root/.cache/rclone/vfs/blob"
2023/07/17 14:40:59 DEBUG : Creating backend with remote "/root/.cache/rclone/vfsMeta/blob//"
2023/07/17 14:40:59 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfsMeta/blob//" to be canonical "/root/.cache/rclone/vfsMeta/blob"
2023/07/17 14:40:59 INFO  : input: Removing directory
2023/07/17 14:40:59 INFO  : input: Removing directory
2023/07/17 14:40:59 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2023/07/17 14:40:59 Fatal error: failed to mount FUSE fs: cannot read /proc/mounts: expected integer

Looks like something odd on the OS side.

Can you

cat /proc/mounts

and share the output.

It is Ubuntu 20.04. Same issues on Azure VM and WSL versions

none /mnt/wsl tmpfs rw,relatime 0 0
none /usr/lib/wsl/drivers 9p ro,dirsync,nosuid,nodev,noatime,aname=drivers;fmask=222;dmask=222,mmap,access=client,msize=65536,trans=fd,rfd=7,wfd=7 0 0
none /usr/lib/wsl/lib overlay rw,relatime,lowerdir=/gpu_lib_packaged:/gpu_lib_inbox,upperdir=/gpu_lib/rw/upper,workdir=/gpu_lib/rw/work 0 0
/dev/sdc / ext4 rw,relatime,discard,errors=remount-ro,data=ordered 0 0
none /mnt/wslg tmpfs rw,relatime 0 0
/dev/sdc /mnt/wslg/distro ext4 ro,relatime,discard,errors=remount-ro,data=ordered 0 0
rootfs /init rootfs ro,size=8058672k,nr_inodes=2014668 0 0
none /dev devtmpfs rw,nosuid,relatime,size=8058700k,nr_inodes=2014675,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
devpts /dev/pts devpts rw,nosuid,noexec,noatime,gid=5,mode=620,ptmxmode=000 0 0
none /run tmpfs rw,nosuid,nodev,mode=755 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,noatime 0 0
none /run/shm tmpfs rw,nosuid,nodev,noatime 0 0
none /dev/shm tmpfs rw,nosuid,nodev,noatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,noatime,mode=755 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
cgroup /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_prio 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/misc cgroup rw,nosuid,nodev,noexec,relatime,misc 0 0
none /mnt/wslg/versions.txt overlay rw,relatime,lowerdir=/systemvhd,upperdir=/system/rw/upper,workdir=/system/rw/work 0 0
none /mnt/wslg/doc overlay rw,relatime,lowerdir=/systemvhd,upperdir=/system/rw/upper,workdir=/system/rw/work 0 0
none /tmp/.X11-unix tmpfs ro,relatime 0 0
drvfs /mnt/c 9p rw,dirsync,noatime,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio 0 0
/dev/sde /mnt/wsl/docker-desktop-data/isocache ext4 rw,relatime,discard,errors=remount-ro,data=ordered 0 0
none /mnt/wsl/docker-desktop/shared-sockets/guest-services tmpfs rw,nosuid,nodev,mode=755 0 0
none /mnt/wsl/docker-desktop/shared-sockets/host-services tmpfs rw,nosuid,nodev,mode=755 0 0
/dev/sdd /mnt/wsl/docker-desktop/docker-desktop-user-distro ext4 rw,relatime,discard,errors=remount-ro,data=ordered 0 0
/dev/loop0 /mnt/wsl/docker-desktop/cli-tools iso9660 ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=iso8859-1 0 0
drvfs /Docker/host 9p rw,dirsync,noatime,aname=drvfs;path=C:\Program Files\Docker\Docker\resources;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio 0 0

Looks like the space in the mount paths may be throwing off the formatting:

const mtabFmt = `%s %s %s %s %d %d`

For the jet lagged person here, where you are seeing the space? I'm trying to eyeball it and failing miserably.

I guess it is this bit...

I wonder how you are supposed to parse it if the mount string can have spaces in?

Perhaps remove the 0 0 from the end as it will always be that according to the docs (it is only there to match /etc/mtab I think) then just use to end of line.

This will need an issue / PR to GitHub - artyom/mtab: Package to read /proc/self/mounts entries

We should probably switch to a maintained package like mountinfo package - github.com/moby/sys/mountinfo - Go Packages

It uses the new /proc/self/mountinfo (proc(5) - Linux manual page) (introduced in Linux 2.6) and seems to handle spaces etc.

1 Like

Sounds like a good plan! Want to send a PR?

That is a hideous bit of parsing! Looks like it will work though and this is a core library used by docker so is likely to be maintained well. Go has always required >= Linux 2.6 so that isn't a limitation.

1 Like

Will do.

@rvm1975, Can you post the output of cat /proc/self/mountinfo too please? This is so I can validate whether switching the library will fix the parsing issue or not.

71 77 0:26 / /mnt/wsl rw,relatime shared:1 - tmpfs none rw
72 77 0:28 / /usr/lib/wsl/drivers ro,nosuid,nodev,noatime - 9p none ro,dirsync,aname=drivers;fmask=222;dmask=222,mmap,access=client,msize=65536,trans=fd,rfd=7,wfd=7
76 77 0:32 / /usr/lib/wsl/lib rw,relatime - overlay none rw,lowerdir=/gpu_lib_packaged:/gpu_lib_inbox,upperdir=/gpu_lib/rw/upper,workdir=/gpu_lib/rw/work
77 63 8:32 / / rw,relatime - ext4 /dev/sdc rw,discard,errors=remount-ro,data=ordered
78 77 0:37 / /mnt/wslg rw,relatime shared:2 - tmpfs none rw
79 78 8:32 / /mnt/wslg/distro ro,relatime shared:3 - ext4 /dev/sdc rw,discard,errors=remount-ro,data=ordered
86 77 0:2 /init /init ro - rootfs rootfs rw,size=8058672k,nr_inodes=2014668
94 77 0:5 / /dev rw,nosuid,relatime - devtmpfs none rw,size=8058700k,nr_inodes=2014675,mode=755
99 77 0:20 / /sys rw,nosuid,nodev,noexec,noatime - sysfs sysfs rw
100 77 0:49 / /proc rw,nosuid,nodev,noexec,noatime - proc proc rw
101 94 0:50 / /dev/pts rw,nosuid,noexec,noatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
102 77 0:51 / /run rw,nosuid,nodev - tmpfs none rw,mode=755
103 102 0:52 / /run/lock rw,nosuid,nodev,noexec,noatime - tmpfs none rw
104 102 0:53 / /run/shm rw,nosuid,nodev,noatime - tmpfs none rw
105 94 0:53 / /dev/shm rw,nosuid,nodev,noatime - tmpfs none rw
106 102 0:54 / /run/user rw,nosuid,nodev,noexec,noatime - tmpfs none rw,mode=755
107 100 0:27 / /proc/sys/fs/binfmt_misc rw,relatime - binfmt_misc binfmt_misc rw
108 99 0:55 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs tmpfs rw,mode=755
109 108 0:21 / /sys/fs/cgroup/unified rw,nosuid,nodev,noexec,relatime - cgroup2 cgroup2 rw
113 108 0:56 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuset
116 108 0:57 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpu
117 108 0:58 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,cpuacct
118 108 0:59 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,blkio
120 108 0:60 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
121 108 0:61 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,devices
123 108 0:62 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,freezer
124 108 0:63 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_cls
126 108 0:64 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,perf_event
128 108 0:65 / /sys/fs/cgroup/net_prio rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,net_prio
130 108 0:66 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,hugetlb
132 108 0:67 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,pids
134 108 0:68 / /sys/fs/cgroup/rdma rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,rdma
137 108 0:69 / /sys/fs/cgroup/misc rw,nosuid,nodev,noexec,relatime - cgroup cgroup rw,misc
141 78 0:39 /etc/versions.txt /mnt/wslg/versions.txt rw,relatime shared:4 - overlay none rw,lowerdir=/systemvhd,upperdir=/system/rw/upper,workdir=/system/rw/work
143 78 0:39 /usr/share/doc /mnt/wslg/doc rw,relatime shared:5 - overlay none rw,lowerdir=/systemvhd,upperdir=/system/rw/upper,workdir=/system/rw/work
145 77 0:37 /.X11-unix /tmp/.X11-unix ro,relatime shared:2 - tmpfs none rw
146 77 0:72 / /mnt/c rw,noatime - 9p drvfs rw,dirsync,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio
413 71 8:64 /isocache /mnt/wsl/docker-desktop-data/isocache rw,relatime shared:14 - ext4 /dev/sde rw,discard,errors=remount-ro,data=ordered
427 71 0:89 /guest-services /mnt/wsl/docker-desktop/shared-sockets/guest-services rw,nosuid,nodev shared:16 - tmpfs none rw,mode=755
435 71 0:89 /host-services /mnt/wsl/docker-desktop/shared-sockets/host-services rw,nosuid,nodev shared:17 - tmpfs none rw,mode=755
443 71 8:48 /docker-desktop-user-distro /mnt/wsl/docker-desktop/docker-desktop-user-distro rw,relatime shared:18 - ext4 /dev/sdd rw,discard,errors=remount-ro,data=ordered
452 71 7:0 / /mnt/wsl/docker-desktop/cli-tools ro,relatime shared:19 - iso9660 /dev/loop0 ro,nojoliet,check=s,map=n,blocksize=2048,iocharset=iso8859-1
732 77 0:221 / /Docker/host rw,noatime - 9p drvfs rw,dirsync,aname=drvfs;path=C:\Program Files\Docker\Docker\resources;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio
1 Like
1 Like

@darthShadow if you push that to a branch on github.com/rclone/rclone it will build binaries which the user can test. I keep meaning to make PRs from maintainers build binaries too but I didn't figure out how to distinguish maintainers from everyone else.

Done. Builds are available here: v1.64.0-beta.7155.f26e41d1c.fix-linux-mounts-parsing

1 Like

These may be useful:

1 Like

@darthShadow useful thanks :slight_smile: I haven't got time to look at now but will bookmark for later.

Fix works fine. Thanks

2023/07/20 12:03:03 DEBUG : rclone: Version "v1.64.0-beta.7155.f26e41d1c.fix-linux-mounts-parsing" starting with parameters ["rclone" "-vv" "mount" "--vfs-cache-mode" "writes" "blob:/" "/mnt/blob"]
...
2023/07/20 12:03:04 DEBUG : sftp://user@site:22//: Mounting on "/mnt/blob"
2023/07/20 12:03:04 DEBUG : : Root:
2023/07/20 12:03:04 DEBUG : : >Root: node=/, err=<nil>

Great, thanks for verifying the fix.

1 Like

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