Mergerfs with rclone

Hi guys.

I was just curious how the priority of the files are working with rclone with mergerfs and Plex.

My encrypted gdrive is mounted to my server at /home/plex/mnt ( decrypted )
My local download folder is /home/plex/media

My mergerfs.service has this mount:

ExecStart=/usr/bin/mergerfs -o defaults,sync_read,allow_other,category.action=all,category.create=ff /home/plex/move:/home/plex/mnt /home/plex/media

If I download a tvshow then its available on plex, which is looking in my /home/plex/media folder . At night the file is uploaded to gdrive. So the file is actually present two places.

Which file is Plex streaming from? :confused:

Is it the local file or does it stream from gdrive?

Thanks

Morphy

It would write to here first:

/home/plex/move

Thanks Ani.

What will happend If I download to /home/plex/media folder ? Because thats the folder im downloading to.

Once downloaded its available in the move folder , at night it moving data from move folder and then delete the content at 5 am .

I’m not quite sure why you 3 folders to be honest.

I have 2 folders for me. One local. One GD.

Everything writes to local and I upload local every night, but I exclude my torrent seeding folder.

May have to look at my setup again.

Can you post your rclone service and mergerfs for me please ?

Ok changed my download folder :slight_smile:

But would be really nice if you could explain which place Plex would actually stream from?

My download folder is now
/home/plex/move ( also my seeding folder ) which is mirrored via merger to /home/plex/media where Plex is seing the content.

Once the file is uploaded to gdrive over night - where would Plex actually stream the content from? From move folder or would it stream from gdrive? The file is present two places at the time.

Just curious :slight_smile:

I keep all my stuff here:

Sonarr/Radarr/Plex all point for me to my /gmedia mount which contains /data/local and my /GD.

The answer of where it streams from is “it depends”. If a file has been written to /gmedia, it always writes to /data/local so until I move it, it streams from there. Once it is uploaded and removed from /data/local, it streams from /GD.

The file is never present at two places at one time as it’s moved.

Ahhhh cheers Ani :slight_smile:

Will look at your homescripts tonight.

@Animosity022

For how long time do you seed your media, do you remove them over night after upload ?

Could be great to hear more about how your setup is running :slight_smile:

Thanks :slight_smile:

I tend to seed for a few days or weeks depending on what it is.

With mergerfs, I can hard link so my local copy takes no extra disk space and I use a 6TB disk for this since they are cheap.

1 Like

Ahh cool.

So your seeding directly from your media folder?

Could you try show by folder name how your setup is running , would like to try implement your setup .

Everything runs from from my /gmedia.

My github does a pretty good job at explaining things I think, but basically:

[felix@gemini gmedia]$ ls -al
total 1
drwxrwxr-x  4 felix felix  32 May  1 03:32 .
drwxr-xr-x 21 root  root  273 Apr 21 15:32 ..
-rw-rw-r--  1 felix felix 205 Apr 12 10:53 hosts
-rw-rw-r--  1 felix felix   0 Jan 24 23:49 mounted
drwxrwxr-x  1 felix felix   0 Jun 17  2018 Movies
drwxrwxr-x  1 felix felix   0 Jun 17  2018 Radarr_Movies
drwxrwxr-x  3 felix felix  26 Mar 18 00:25 torrents
drwxrwxr-x  6 felix felix 123 May  1 05:28 TV
drwxrwxr-x  1 felix felix   0 Jun 30  2018 TV_Ended
[felix@gemini gmedia]$

I exclude my torrents from my copy and I copy up /data/local, which is the local disk underneath that files are stored.

Yea read your workflow :slight_smile:

My Workflow

I use Sonarr and Radarr in conjuction with NZBGet and ruTorrent/rtorrent to get my media. My normal flow is that they grab a file, download it and place it in /gmedia under the correct spot of /gmedia/TV /gmedia/Movies respectively and that is local underneath the covers. Each night, a rclone upload scripts moves from local to my Google Drive. To acheive that, I use rclone to mount my Google Drive and mergerfs to combine a local disk and Google Drive together to provide a single access point for all services.

So just to make sure :slight_smile: - You download your content directly to your /gmedia folder ( which is local as I read it) . Then you have /data/local which automatically moves to gdrive over night.

So your seeding happends directly from the /gmedia folder , even though your content is uploaded over night. So your also seeding locally I assume? :slight_smile:

Yes, I can make that a little more clear as I do not seed anything from my GD as that’s just a bad use case for cloud storage with the way it does IO.

1 Like

Awsome :slight_smile:

Gonna fix this tonight . Sounds very interesting .

Thanks for your replies

Morphy

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