How to Mergerfs

I am reading up on Mergerfs because Sonarr etc has been hanging up whenever it is uploading to my Gdrive. From my reading, it seemed that Mergerfs will solve the issue. I am very new in rclone and linux and trying to wrap my head how to set up Mergerfs.

I understand that Animosity022's configuration is that he combined a local drive and Gdrive into one drive called /gmedia. Everything that is downloaded and processed by Sonarr/ Radarr will therefore be under /gmedia/TV shows etc. These will be written under the local disk of /gmedia. At night, a scipt will move and upload these files to the Gdrive under /gmedia. As Plex still see the same files under the same directory /gmedia/TV shows, it will continue to work as though the files have never been moved.

Am I correct in my understanding?

As I have never set up Mergerfs before, my questions are:

Q1. . How do I ensure that the files are downloaded and processed in the local disk, instead of Gdrive? I imagine my qbittorrent download path would be /gmedia/downloads, and point Sonarr to gmedia/TV Shows (which Sonarr will processed and copy to). How would I know if it was wriiten to the local disk or gdrive?

Q2. I assumed that a player error message will occur when someone tried to access the file while it is been moved from local to gdrive?

Q3. Apart from setting up Mergerfs, is there other ways to stop Sonarr etc from hanging when a file is uploading via rclone? From the way I see it, the workaround solution here is quite similar to cache-tmp-upload-path and wait-time. If we are able to set the wait-time as one specific timing e.g 4am instead of duration, then it will worked almost the same way as Mergerfs. Can it be done?


I have managed to use mergerfs following Animosity script:

In mergerfs, there is a found first policy which means that the first disk listed is always written to. I use that policy to make sure that the local disk is used for everything

It's possible but there is about a 10 second window when that would happen and I do my moves in the middle of the night.

I do not know what you mean by hanging on. I've never had a problem with Sonarr or Radarr.