Rclone

Rclone the software that you will need to add content to your Google Drive and for mounting your drive. So go grab your self a copy and install it. It’s not hard, but will provide some instructions for various platforms later.

Before you start, make sure you have created your own api key and secret, see the page I have on gSuite, rclone will work without it but will be slower as it uses a shared api key. Much better to create your own.

Configuring

Open a terminal and run
rclone config
Follow the steps to add a config for your google drive, at the end you will need to authenticate to access your drive. In the following examples I have named my remote as gDrive

So once you have completed the setup if you enter
rclone lsd gDrive:
You should get a listing of folders in the root of your google drive.
If so then it is all good, rclone has access to your google drive.

Mounting

Now we can mount your drive, you will need to create a folder to mount the drive on to. I have created a folder called rcloneMount
the basic command to mount your drive is this:
rclone mount gDrive: /path/to/folder/rcloneMount --allow-other &

If this was successful you should be able to see your files and folders in the rcloneMount folder.

There are a multitude of flags that you pass to rclone, these are what I use:
--allow-other ---log-level INFO --log-file /path/to/logs/rclone.log -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 &
they may not be needed as I think the defaults are pretty good these days.

If you need to unmount the drive:
fusermount -uz /path/to/folder/rcloneMount
or on a Mac
umount /path/to/folder/rcloneMount

Before rushing over to plex and adding libraries directly to your mount. I suggest using symlinks. This allows you to change mount points without plex initiating major scans. This could also be used to switch between using plexdrive or rclone, one mount point / folder for plexdrive and another for rclone, then just change the symlinks, or have two folders of symlinks and simply rename the folders to swap between them.

Create another folder e.g.
/path/to/folder/gMedia
We will create symlinks in here and point the Plex libraries to this, this way if you change your mount point, you just need to recreate these symlinks and Plex will be unaware that anything has changed
For example if I have a folder in my gDrive of plex/Movies then to create a symlink to this folder:
ln -s [src] [destination]
ln -s /path/to/folder/rcloneMount/plex/Movies /path/to/folder/gMedia/Movies

So go ahead and create a Library in Plex that points to your symlink. Sit back and watch as Plex populates your Movie Library with the content from your Google Drive. Yes… it might take quite a long time depending on the number of items it is adding. (Which is why I suggest the symlinking option above, as you don’t want to be doing this too often.)

So at the moment mounting and un mounting is a manual process, so I have a small script that I use via a cronjob, it checks if the drive is mounted, if not it tries to forceably un mount and then remount. I have this set to check every minute.

You need to know the full paths to your executables, rclone or/and plexdrive.
For rclone you can find this by enter which rclone on the command line. which should work for plexdrive and fusermount as well, as you may need these locations.

And you need to make sure the fusermount -uz /home/mount/gDrive command works on your box to un mount the drive

The Script: (Change the paths to match your environment)

#!/bin/bash
#!/usr/local/bin/rclone
#!/usr/local/bin/plexdrive
# 3. Add to crontab -e (paste the line bellow, without # in front)
# * * * * *  /path/to/script/remounter.sh >/dev/null 2>&1
# Make script executable with: chmod a+x /path/to/script/remounter.sh

if [ -d '/path/to/a/folder/in/mount/plex/' ]
then

	# Mounted, so nothing to do
	echo Drives Mounted

else
    
    echo Drives Not Mounted
    /bin/fusermount -uz /home/mount/gDrive

    /usr/local/bin/rclone mount yourremote: /home/mount/gDrive --allow-other --buffer-size 256M --dir-cache-time 6072h --drive-chunk-size 128M --use-mmap --log-level INFO --log-file /path/to/logs/rcloneMount.log --umask 002 --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off --vfs-cache-mode writes &

fi
exit

Then from the terminal enter crontab -e and add this line.

* * * * *  /path/to/script/remounter.sh >/dev/null 2>&1

It may offer the choice of editor to use, or it may just use vi which can be a bit unfriendy if you have not used before. use the arrows key to move to the bottom of the file press CTRL+i to enter insert mode, paste the line of text, then ESC to leave insert mode and finally :wq to write out the changes to the file and then quit

So this should keep your drive mounted all the time, which should also include reboots.