Ideas - Upload content only when X amount of space is used up? | PlexGuide.com

Ideas Upload content only when X amount of space is used up?

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

chris247

Noobz
Original poster
Jul 13, 2018
1
0
I was thinking how awesome it would be if we could have a hybrid set up. Some files stored locally while others are on gdrive. The unionfs already does this but files get uploaded as soon as they get downloaded. What if we could set a threshold of used space and when we go over it, it begins uploading to gdrive beginning with older files until we go below the threshold again . This way, new content(which gets played more most of the time) stays local and removes the need to read from gdrive on every play. I have a 2nd server that I already do this but I did it super hacky and basically threw together a bunch of scripts that I found online. This is specially useful for people with dedicated servers that often come with 1-2tb drives.
 

kamos69

Experienced+
Donor
Apr 22, 2018
131
71
I was thinking how awesome it would be if we could have a hybrid set up. Some files stored locally while others are on gdrive. The unionfs already does this but files get uploaded as soon as they get downloaded. What if we could set a threshold of used space and when we go over it, it begins uploading to gdrive beginning with older files until we go below the threshold again . This way, new content(which gets played more most of the time) stays local and removes the need to read from gdrive on every play. I have a 2nd server that I already do this but I did it super hacky and basically threw together a bunch of scripts that I found online. This is specially useful for people with dedicated servers that often come with 1-2tb drives.
I used to run my server like this when I had plenty of space. You'd have to do two things:
  1. Change the the move script to copy instead of move.
  2. Run a script that checks disk space regularly and then empties the /unionfs/move folder when your drive reaches a set threshold. You can check out my script here: https://github.com/kamos69/scripts/blob/master/checkdisk.sh
    NOTE: Please make sure you change the variables under settings.
Last note on this, if you have a SSD or NVME server with a fast CPU and Internet connection, the performance benefits of storing some of your content locally is minimal. On average, my EX61-NVME Hetzner server takes about 5-7 seconds to play an item.
 
  • Like
Reactions: 1 user
M

MrDoob

Guest
@kamos69

Thanks for this script bundle

I fork it, maybe I found a good solution for all user of PG , with more space left.

( as cache drive options )
 
Last edited by a moderator:

Recommend NewsGroups

      Up To a 58% Discount!

Trending