Google Drive vs. ACD for Plex

@jmacul2

How much data do you have up on Gdrive and have you made any modifications to the last version of the node-gdrive-fuse module or is it just vanilla?

I sort of followed this post to tweak a few things:

The modtimes were broken for a while, but the latest pull from githib fixed those.

The only thing I am doing is running:

`watch -n 60 plex-node-cleanup`

on this script:

#!/bin/sh

find /media/media/Temp/gdrivecache/download -maxdepth 1 -mmin +1 -exec rm -f {} \;

The cache fills up and apparently it is not being cleaned up, so this is a hack to get that working.

I had the cache of node-gdrive-fuse pointing to /dev/shm (memory) as that post suggested, but had problems with that as I only have 8GB of memory on this machine.

Then I use a cronjob to make sure it stays up.

`* * * * * /usr/local/bin/plex-node-mount-check >/dev/null 2>&1`

#!/bin/sh

if ps -ef | grep -v grep | grep "node fs.es6.js" ; then
exit 0
else
/usr/local/bin/plex-node-mount
exit 0
fi

#!/bin/sh

#Unmount any directories already mounted
/bin/fusermount -uz /media/media/.gfuse

#Kill process if any
ps -ef | grep -v grep | grep "node fs.es6.js" | awk '{print $2}' | xargs kill

#Mount the node google drive again
cd /root/Src/node-gdrive-fuse/src&&node fs.es6.js &

exit

1 Like

My library is at 12 TB right now. FYI.

Thanks for this @jmacul2

The fix for the cache clear up, thatā€™s the node-gdrive-fuse cache I gather. Why do you need to clean this up?

It will just fill up your hard drive if you donā€™t. I left it alone for a while and that folder was almost at 1 TB. So if you are using a machine with limited local storage then you need to make sure it gets cleaned up. Iā€™ve done a bit of node development, I am thinking of resurrecting this project to fix the bugs. I might have some free time in a week or two to look at it. The cache feature really isnā€™t needed for files IMO. Cache is great for the changes and folder structure, but file caching is rarely used really. Its more of a pain than its worth.

So what if (this may not be how the cache works) a movie file is in the cache and you nuke it, wonā€™t it affect playback?

node-gdrive-fuse downloads files into chucks and caches those chunks. My understanding is it will first look for an existing chunk for the part of the file needed. If the chuck isnā€™t there, it will just download it like normal. Google drive is so fast (for me at least) that the potential speed up isnā€™t really that much. In theory, the benefit for chuck caching is scan times. So for example, say you are watching a movie, and you scan backwards. It would fetch the cache if it exists instead of starting the download again. So scanning would be quick. But we are talking about, what, .5 seconds vs 2 seconds at best? The developer never intended that the cache be infinite anyway. There is a maxCacheSize setting on your JSON config. Its just not being enforced because of a bug.

Well this is what I get :

Danials-iMac:~ danial$ ps aux | grep fs.es6.js
danial          10485   0.0  0.0  2456396   3212 s003  S+    1:36PM   0:00.01 grep fs.es6.js
danial          10473   0.0  0.3  3214972 104904 s002  S+    1:35PM   0:01.11 node fs.es6.js
Danials-iMac:~ danial$ 

Even when there is nothing running, I have this :

Danials-iMac:~ danial$ ps aux | grep fs.es6.js
danial          10491   0.0  0.0  2437964   3168 s003  S+    1:37PM   0:00.01 grep fs.es6.js
Danials-iMac:~ danial$ 

And the folder is not mounted with anything else, I pretty much made new folders again.

Daniel:

It looks like your mount is working fine. What is the problem? The unmount error is normal if the folder hasnā€™t been mounted before. Be default, node-gdrive-fuse runs in the forground. If you want to background it, add a ā€œ&ā€ to the end of the command.

It sound and looks itā€™s fine, but I donā€™t have drive that show my Google Drive stuff, and that just sits there.

For example when you use acdcli or ocamlfuse, after the mount, folder change to remote volume, this one doesnā€™t do anything and the folder still there.

Type ā€œmountā€ after you run the command and tell me what is says.

1 Like

Thanks, the mount show me what was wrong.

I figured what was the problem from, so inside the config file I placed " ./mtng2 " to pickup from my root folder inside the user (which were the folder located) but the app was trying to mount inside the " src " folder and thatā€™s why it couldnā€™t mount it I guess and nothing was happening.

I had to change the mount location like this to work " /Users/danial/mtng2 "

Thanks again :smile:

@jmacul2
So when you want to refresh your mount, what should you do?
Delete the ā€œdataā€ folder in the cache or the ā€œinodeTree.jsonā€ file?

@jmacul2
Whatā€™s your config file setup look like ?

@jmacul2
Thanks again for the help, sorry I keep editing this, I canā€™t reply anymore.

@jmacul2
How you make yours to be automatic if it fail and unmount?

It refreshes every 60 seconds (by default). There are bugs if you move or create files inside the mount. But if you do all your changes using the google drive web interface or if you use rclone copy/move, the changes will just show up after the delay.

My config is just the defaults.

1 Like

@Stokkes
Can you please give me some more hints?
I mounted with node-gdrive-fuse.
Then i should create with rclone config:
9 / Local Disk
\ ā€œlocalā€
then point to my node-gdrive-fuse crypted dir,
Then if i well understood i should mount it, but i cannot.
How can i do it?

@fbrassin

First, give me the folder you mounted node-gdrive-fuse and give me the folder that has your encrypted media for Plex.

For example, here is my setup for node-gdrive-fuse that Iā€™m currently testing:

node-gdrive-fuse mount point: /home/user/.media/gd-encrypted
rclone local remote config: /home/user/.media/gd-encrypted/Media <-- my Media folder has all encrypted media
rclone local remote mount point: /home/user/.media/gd-decrypted

Make sure you use the same user/pass that you had for your encrypted mount in your local remote.

When I look in /home/user/.media/gd-decrypted I see all my media (decrypted of course) and rclone is using node-drive-fuse to read the encrypted media and decrypt it on the file system.

@Stokkes
node-gdrive-fuse mount point: /media/Google
My creypted data are in /media/Google/crypt
But i think i didnā€™t understand this point:
rclone local remote config:
How did you do this?

Create a new config in rclone: rclone config and make sure itā€™s type ā€œcryptā€ and when it asks you the location, point to the local folder where you media is on node-gdrive-fuse.

So when I created a new rclone remote, I did:

  1. rclone config
  2. n for new
  3. 5 for crypt
  4. /home/user/.media/gd-encrypted/Media for my remote location
  5. Set the same passwords as when I encrypted the media with my other google encrypted remote.

@jmacul2

Iā€™m noticing this when I sync for the first time (on my big >30TB library):

{"level":"debug","message":"After attempting to parse, there is 240468 items in the inodeTree and 16165 items that were not yet parseable","timestamp":"2017-03-06T19:57:01.281Z"}

Not sure if this will cause some media to not show up, Iā€™m afraid it may. And I have no idea what this means or how to fix it.

@Stokkes

Tnx, now i got it.
It didnā€™t work because i didnā€™t put ā€œ:ā€ after rclone local remote :slight_smile:

Another question.
Now that i mounted my google with node-gdrive-fuse and then with rclone to unencrypt, as i have to make many changes to my remote library and rescan with plex, do you think i can avoid ban?