G suite mount on qnap or synology

excellent ok. so now lets try unmounting it with

fusermount \-uz /volume1/PlexCloud

and see if that works

I get

[1]+ Done /usr/bin/rclone mount -v Gdrive: /volume1/PlexCloud --allow-other

and if you type

mount

it’s gone from the list and
ls
now shows an empty directory?

That’s correct

Ok so lets try this command:

/usr/bin/rclone mount \-v Gdrive: /volume1/PlexCloud \--allow-other \--dir-cache-time 672h \--vfs-cache-max-age 675h \--vfs-read-chunk-size 64M \--vfs-read-chunk-size-limit 1G \--buffer-size 32M &

I get

[1] 26461

Right thats good, thats just the process number that has been put in the background

So now an ls on the mounted directory should show your 4K folder?

and the drive should be mounted with the flags we have set.

I get

/volume1/PlexCloud ls
4kMovies

Success then. Yay.

So

ls /volume1/PlexCloud/4kMovies

should show you all your movies.

That’s right!

So next step.

if you create a new library in Plex,

can you point it to /volume1/PlexCloud/4kMovies

Yep and I just set it up.

Excellent,

Why we had to escape the flags with the \ I am still not sure, as I don’t have to do that here.

That is very strange. Is that it or is there a way on the Synology to remount the Folder if the server is ever restarted or shuts down?

At the moment you will need to run that command manually if you restart the nas

To get it to mount on reboot we will need to look at adding it to cron.
(at least I think that’s what I did, but can’t quite remember, so will have to go and check)

I’ll come back to you tomorrow with instructions for that, if thats ok.

That’s fine you have been super helpful on this thank you. Also when speaking of automation, what is your setup to make it when your media is downloaded it automatically gets added to GDrive? Again, thank you so much for your help! I am now direct playing 4K content on my Apple TV 4K using Infuse.

It seems that my cron stuff has disappeared… I think that probably happened when I had to re-install the DSM after the first time it updated to DSM 6.2-23739 Update 2 it made a right old mess…

So to get the nas to mount the drive when it restarts, I would try this:

Create a shell script called nas-mountOnStartup.sh, probably easiest to create the file on your mac and then move it your nas.
I would suggest creating a directory in root folder (the same folder you did the screenshot of earlier in this thread) called scripts and copying the file to there. The file should contain this:

#!/bin/bash
#!/usr/bin/rclone
# Make script executable with: chmod a+x /root/scripts/nas-mountOnStartup.sh

/usr/bin/rclone mount Gdrive: /volume1/PlexCloud \--allow-other \--dir-cache-time 672h \--vfs-cache-max-age 675h \--vfs-read-chunk-size 64M \--vfs-read-chunk-size-limit 1G \--buffer-size 32M &
	
exit

Once you have moved it to the nas, while in the root directory type

chmod a+x /root/scripts/nas-mountOnStartup.sh

to make it executable.

If your Google drive is still mounted, un mount it:

fusermount \-uz /volume1/PlexCloud
(check that it is un mounted)

and then run the new script by running this (that is if you put the script where I suggested)

bash /root/scripts/nas-mountOnStartup.sh

and check that the drive is now mounted again.

If it is then the script is working. And you can move on to the next bit.

Up to this point I have done all this and it works here, if I run my script it mounts my drive

But this next bit I have done, BUT HAVE NOT TESTED IT as I don’t really want to restart my Nas at the moment.

Having just looked in my DSM there is the Task Scheduler so rather than messing with cron I would try using the Task Scheduler and create a triggered task, set user to root and event Boot-up and add this script.

In the Task Setting panel add
bash /root/scripts/nas-mountOnStartup.sh
In the User Defined Script Box

I created the scripts directory but how do I get the file into it using ssh?

ah, can you get the file somewhere on your nas through any shares that you have setup, then we can just move it using ssh

Ok I added it to one of the shares, now how do I transfer it?