Unable to mount loop files with rclone

I have uploaded a 280GB SquashFS file on Google Drive with Rclone, and I’m trying to mount it.

Google Drive has been mounted on /media/gdrive and assume the file is /media/gdrive/home.sqfs

I get this error:

# mount /media/gdrive/home.sqfs /media/loop/
mount: /media/loop/: failed to setup loop device for /media/gdrive/home.sqfs.

This does not happen with the local home.sqfs file.

Remote home.sqfs is accessible to all users.

Has someone got a clue?

Thanks in advance.

Run the mount with -vv and then paste what it logs - that will give us a clue. It might be that the fuse mount is missing support for something…

Try setting up the loop device in advance with kpartx -a -r /media/gdrive/home.sqfs then mounting the device nodes it makes. Use lsblk to see the device nodes it makes.

I recently played with squashfs images on Google Drive and managed to solve the problem by mounting it read-only. The output from rclone mount -vv said it can’t open the file in read-write mode. So I used this:

$ rclone mount remote:directory local --allow-other
$ sudo mount -o loop,ro local/file.sqfs /mnt

It would be nice to automate this into an rclone command.

1 Like

I confirm that the ketotek suggestion is correct.

Don’t know why, as squasfs files are for definition read-only, but adding “-o ro” make the mount of squashfs files possibile.

The mount time of a remote squashfs is not exactly fast with HubiC: it took me 2m46s to mount a 55GB squashfs file.

It took 3m23s to explore the directory structure of the squashfs file which contained 118.000 files.

I will try to test later with Google Drive.

1 Like

Did you try the mount with -o ro as above?