Log full of SLOW QUERY warnings when running Plex -- GOOGLE DRIVE

Yes, it does!

Hooray… and are they the same as what you see in your plexdrive drive?

If they are and you want to try, here is what I would suggest.

If possible, stop plex from running so it does not try and scan anything.

Use your start/stop script to stop plexdrive

Hopefully that will un mount plexdrive, so best to check if the plexdrive directory is empty after running the stop script.

Then on the command line try this command

rclone mount Google: /home/hd23/lordcrumb/mnt/plexdrive --allow-other &

(There are more options to add to this command, but let us see if this works first)

That should mount your drive to /home/hd23/lordcrumb/mnt/plexdrive but using rclone rather than plexdrive.

So after running this command have a look in your plexdrive directory and see if you see the folders.

Success! This worked! I have been able to both see the GDrive contents in Plexdrive, as well as when restarting Plex am able to play content! And it DID load much faster! Thanks you very much for this! Now the question is how I can get rid of plexdrive for good, and then have rclone mount this on its own in case of a restart, but I guess I will try to ask supprt for this. Do you think I should try to do a library scan now?

slow down…

Don’t scan it yet.

ok…

So before scanning, have you added your google drive api key and secret to your rclone config,

if not then scans will be very slow as they use the rclone shared key.

I think that is what I had to do initially when I have set up rclone so I can copy files back and forth. Is there a way to verify this?

If you edit the rclone config file you should be able to see

enter rclone config file to find where is, then

nano /path/to/.config/rclone/rclone.conf

replace /path/to/.config/rclone/rclone.conf with the location of yours.

OK, it gave me type - drive
scope - drive
token - access token (a ver long numer of letters and numbers, I assume this is the key)
root_folder_id (another number)
and then information on the gcache.

No I think that means it they are not there. for example mine has these 2 lines in

client_id = 10346971.....redacted
client_secret = 5Z-jU4... redacted

From what I remember, they should the same values that you used in plexdrive.

If you are not sure you should be able to find them in the google developers site.

ok, I found client id and client secret on the Google api from when I set up plexdrive. Where and how do I add that in now?

rclone config

and then edit your Google remote, you should get the option to add them in there.

Not sure if you will need to go through the authentication process after adding them.

Done, I have been able to add them in and also verified that they are in the config file, where I found both of those lines.

Is there anything else that needs done now, restart rclone to make this work or similar?

Or am I almost good to go?

So let’s stop plex again and un mount the drive

fusermount -uz /home/hd23/lordcrumb/mnt/plexdrive

Then let us try mounting it without the --allow-other flag, as I am concerned that could allow other users on the seedbox to use it.

So mount it again without that flag and check that plex can still play files

rclone mount Google: /home/hd23/lordcrumb/mnt/plexdrive &

OK, I have done that. Strange thing is that I can access GDrive through the file system (I get into the drive’s folders from the file browser on the box) but in Plex itself the videos show as unavailable…

thought that might happen as plex runs as another user, so you will need to add that flag back.

You’re right, that did it,. Now content is playing again and available. So I assume I will keep using that command? And the API key was working, correct?

Think so.

These are all the flags that I use in my mount commands (are they all needed not sure, but they work for me):

rclone mount Google: /home/hd23/lordcrumb/mnt/plexdrive --allow-other --buffer-size 256M --dir-cache-time 6072h --drive-chunk-size 128M --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off --vfs-read-chunk-size 128M &

So up to you if you want to try these or just use the basic mount command.

and if you want rclone to log to a file add these flags:

--log-level INFO --log-file /path/to/logs/rclone.log

change this /path/to/logs/ to somewhere you can access

and then if your feeling brave… try a scan, but best to try 1 library at a time and don’t blame me if you get a temp google ban (what with your mahusive library :wink: )

For mounting on a reboot I just use a simple script and add it to the crontab, I can let you have that, but best to see if you have crontab available on your box

Not sure about removing plexdrive, if it is stopped when there is a reboot does it get started automatically?, if so then best ask support if that can be stopped

I will have to look up what they all mean and then try to make a decision on that. I’ll probably try the scan first with the movies, as it is only 11k, and see how that goes - I’ll probably do that over night in case it takes too long, but I will let you know for sure.

I’ll also ask support about the crontab availability, that sounds very useful - I’ll get back to you on that.

Thank you very much for your help on this - truly appreciated!

Your welcome, and good luck.