I have an rclone config for mega which I mount it via
rclone mount mega: ~/mega --vfs-cache-mode writes
Everytime I unmount via
fusermount -u ~/mega
It throws
mega: Failed to unmount: exit status 1: fusermount: failed to unmount ~/mega: Device or resource busy
I have two questions:
What's the proper way to mount & then unmount ?
Everytime I force umount, it leaves an open running instance under mega Security Settings > Session History (which get piled up on frequent usage). How to avoid this situation ?
I've solved it btw. Just needed to end with & rclone mount mega: ~/mega --vfs-cache-mode writes &
Then fusermount saned out.
@Animosity022 I don't think it's a good idea to run rclone as root just to automount it. You can do it from home too, especially when you config your cloud storage as a user.
I usually started mounting with .bash_profile, then unmounting via .bash_logout.
As I shared above, that works great except if you have processes/IO running against it and it won't unmount. You have to remove all processes from the mount to unmount it as that's how network mount works.
Which is exactly what I wanted. I couldn't be running a rclone mount daemon in a terminal minimized right. Just put it in bg & access mount via my favorite file manager.
And yah. I've misunderstood systemd service as a root only method (I've just remembered that I can also do it via --user)