I know we already know this but I just wanted share my how much I love rclone now.
I only started to use it 2 weeks ago and this is now no. 1 favourite app.
The main reason I fell in love with it because of the mount thing.
I made script which will download around 1TB of data (videos) from a website. But I have like 250GB SSD, so not possible to download then copy to Gdrive.
So, I mounted my Unlimited Gdrive to my dedicated server (120gb SSD), I started to download the videos on the mounted directory. I was 99% sure that it would not work, but turns out it worked without any issue..!!! I was seriously amazed with it. That's when I fell in love with it.
But I had an issue, VFS Cache was filling the storage with local cache, I was going nuts then after reading the docs again I fixed the issue with --vfs-cache-max-age 15m0s (15 min TTL).
The only downside is that on Linux, killing (-9) rclone does not kill the fusermount.
In Linux, you really want to avoid sending a -9 or a SIGKILL as it terminates a process without any cleanup. You really want to use fusermount rclone or kill it regularly.
rclone mount remote:path/to/remote /path/to/local --vfs-cache-mode writes --vfs-cache-max-age 15m0s --daemon
And you can use fusermount to unmount it:
[root@gemini ~]# rclone mount GD: /Test --daemon
[root@gemini ~]# df -h /Test
Filesystem Size Used Avail Use% Mounted on
GD: 1.0P 96T 1.0P 9% /Test
[root@gemini ~]# fusermount -uz /Test
[root@gemini ~]# df -h /Test
Filesystem Size Used Avail Use% Mounted on
/dev/sda4 216G 66G 151G 31% /
[root@gemini ~]#
In my example, I just ran as root, but you can run as a regular user as well.
The thing to remember though is the mount really doesn't completely unumount until you stop the IO from it. So if you are writing to it and try to unmount it, it's going to hang around until the IO is done.
harry@HARRY-MBP:~$ rclone mount gdriveP: /home/harry/testdir --vfs-cache-mode writes
2019/10/16 22:53:13 mount helper error: fusermount: fuse device not found, try 'modprobe fuse' first
2019/10/16 22:53:13 Fatal error: failed to mount FUSE fs: fusermount: exit status 1